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 01:35:21 -0800
committerJean Chalard <jchalard@google.com>2013-02-23 01:46:39 -0800
commitc6799ffeab17d3e0dc54a1718dad9890e5493ae0 (patch)
tree8e85b076f93171a1e22ff70ff1631ce56113bd05 /java/src/com/android/inputmethod/latin/makedict/FormatSpec.java
parentaefaec3c5fc4b9aa3126ae0a7f32133c0423e7e2 (diff)
downloadlatinime-c6799ffeab17d3e0dc54a1718dad9890e5493ae0.tar.gz
latinime-c6799ffeab17d3e0dc54a1718dad9890e5493ae0.tar.xz
latinime-c6799ffeab17d3e0dc54a1718dad9890e5493ae0.zip
Send the dictionaries descriptions to the dict pack
Bug: 8255795 Change-Id: I12a5922f50c2d2e3aa639457abcc1483e6a48721
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() {