aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/makedict/FormatSpec.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2013-02-23 02:20:34 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2013-02-23 02:20:34 -0800
commit6b909d38f3d64ec67e42261961d27acbcb195c5c (patch)
treea1ad3722d7369d74432aa3b45dc549baf2cee404 /java/src/com/android/inputmethod/latin/makedict/FormatSpec.java
parent81e13359a799d45a19960302323c7e1d2b0d2cab (diff)
parent0f3c05cd6bee664e5ccaf632c35c34017eb1c5e9 (diff)
downloadlatinime-6b909d38f3d64ec67e42261961d27acbcb195c5c.tar.gz
latinime-6b909d38f3d64ec67e42261961d27acbcb195c5c.tar.xz
latinime-6b909d38f3d64ec67e42261961d27acbcb195c5c.zip
am 0f3c05cd: Merge "Send the dictionaries descriptions to the dict pack"
* commit '0f3c05cd6bee664e5ccaf632c35c34017eb1c5e9': Send the dictionaries descriptions to the dict pack
Diffstat (limited to 'java/src/com/android/inputmethod/latin/makedict/FormatSpec.java')
-rw-r--r--java/src/com/android/inputmethod/latin/makedict/FormatSpec.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/latin/makedict/FormatSpec.java b/java/src/com/android/inputmethod/latin/makedict/FormatSpec.java
index 60ba66e27..e1e5e5500 100644
--- a/java/src/com/android/inputmethod/latin/makedict/FormatSpec.java
+++ b/java/src/com/android/inputmethod/latin/makedict/FormatSpec.java
@@ -259,6 +259,7 @@ public final class FormatSpec {
private static final String DICTIONARY_VERSION_ATTRIBUTE = "version";
private static final String DICTIONARY_LOCALE_ATTRIBUTE = "locale";
private static final String DICTIONARY_ID_ATTRIBUTE = "dictionary";
+ private static final String DICTIONARY_DESCRIPTION_ATTRIBUTE = "description";
public FileHeader(final int headerSize, final DictionaryOptions dictionaryOptions,
final FormatOptions formatOptions) {
mHeaderSize = headerSize;
@@ -280,6 +281,13 @@ public final class FormatSpec {
public String getId() {
return mDictionaryOptions.mAttributes.get(FileHeader.DICTIONARY_ID_ATTRIBUTE);
}
+
+ // Helper method to get the description
+ public String getDescription() {
+ // TODO: Right now each dictionary file comes with a description in its own language.
+ // It will display as is no matter the device's locale. It should be internationalized.
+ return mDictionaryOptions.mAttributes.get(FileHeader.DICTIONARY_DESCRIPTION_ATTRIBUTE);
+ }
}
private FormatSpec() {