public final class GoogleJsMessageIdGenerator extends java.lang.Object implements JsMessage.IdGenerator
JsMessage.IdGenerator designed to play nicely with Google's Translation
systems. Each message is scoped to a project id, so that it does
not conflict with other messages at Google.
Just as reminder what key type used in different formats:
| Constructor and Description |
|---|
GoogleJsMessageIdGenerator(java.lang.String projectId)
Creates an instance.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
generateId(java.lang.String meaning,
java.util.List<java.lang.CharSequence> messageParts)
Generate the ID for the message.
|
public GoogleJsMessageIdGenerator(java.lang.String projectId)
projectId - A TC project name (e.g. "MyProject")public java.lang.String generateId(java.lang.String meaning,
java.util.List<java.lang.CharSequence> messageParts)
JsMessage.IdGeneratorgenerateId in interface JsMessage.IdGeneratormeaning - The programmer-specified meaning. If no @meaning
annotation appears, we will use the name of the variable it's
assigned to. If the variable is unnamed, then we will just
use a fingerprint of the message.messageParts - The parts of the message, including the main
message text.Copyright © 2009-2020 Google. All Rights Reserved.