Skip to content
This repository has been archived by the owner on Jan 13, 2023. It is now read-only.

spanish languaje :) #28

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,286,295 changes: 1,286,295 additions & 0 deletions assets/es-utf8.txt

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions esWordlistReadme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

Recursos Lingüísticos Abiertos del Español
Versión v2.6 (es)
https://github.com/sbosio/rla-es
Binary file added res/drawable-hdpi/ime_es_lang_lower.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-hdpi/ime_es_lang_single.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-hdpi/ime_es_lang_upper.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable/ime_es_lang_lower.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable/ime_es_lang_single.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable/ime_es_lang_upper.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
98 changes: 98 additions & 0 deletions res/values-es/arrays.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string-array name="pref_inputmode_entries">
<item>Diccionario</item>
<item>Texto</item>
<item>Número</item>
</string-array>

<string-array name="pref_lang_titles">
<item>Ingles</item>
<item>Ruso</item>
<item>Alemán</item>
<item>Frances</item>
<item>Italiano</item>
<item>Ukraniano</item>
<item>Español</item>
</string-array>

<string-array name="capsMode">
<item>Minúsculas</item>
<item>Inicial</item>
<item>Mayúsculas</item>
</string-array>

<string-array name="keyMode">
<item>Diccionario</item>
<item>Texto</item>
<item>Número</item>
</string-array>

<string-array name="smileyContentDescription">
<item> Sonríe </item>
<item> Payaso </item>
<item> Sonrisa aguda </item>
<item> Gato </item>
<item> Media nariz </item>
<item> Schadenfreude </item>
<item> Gran ojo con una sonrisa aguda </item>
<item> Sonrisa de ojos grandes </item>
<item> Sonrisa pícara </item>
<item> Riendo </item>

<item> Riendo a ojo de buey </item>
<item> Riendo con los ojos cerrados </item>
<item> Ojo grande riendo </item>
<item> Gafas nariz puntiaguda riendo </item>
<item> Sonrisa de sombrero puntiagudo </item>
<item> Frunce el ceño </item>
<item> Triste </item>
<item> Descorazonado </item>
<item> Payaso triste </item>
<item> Triste pícaro </item>

<item> Llanto </item>
<item> Riendo hasta las lágrimas </item>
<item> Expletivo </item>
<item> Frunciendo el ceño conmocionado </item>
<item> El ceño fruncido de los ojos de los bichos </item>
<item> Triste con los ojos cerrados </item>
<item> Llorando con la boca abierta </item>
<item> Frunce el ceño con la boca abierta </item>
<item> Conmocionado </item>
<item> Sorprendido </item>

<item> Beso </item>
<item> Sonrisa guiñando el ojo </item>
<item> Risa guiñando el ojo </item>
<item> Lengua descarada fuera </item>
<item> Lengua fuera </item>
<item> Bromeando </item>
<item> Ojos grandes con la lengua fuera </item>
<item> Molesto </item>
<item> Escéptico </item>
<item> Indeciso </item>

<item> Confundido </item>
<item> Ojos cerrados </item>
<item> Sin impresionar </item>
<item> Avergonzado </item>
<item> Boca cerrada </item>
<item> Censurado </item>
<item> Banquero </item>
<item> Boca muy grande y triste </item>
<item> Travesura/sarcasmo </item>
<item> Cara agria </item>

<item> Gato inocente </item>
<item> Sonrisa inocente </item>
<item> Guiño maligno </item>
<item> Sonrisa malvada </item>
<item> Ojos rasgados </item>
<item> Sonrisa de sombrero de fiesta </item>
<item> Brazos arriba animando </item>
<item> Corazón </item>
<item> Corazón roto </item>
<item> Gato de ojos grandes </item>
</string-array>
</resources>
75 changes: 75 additions & 0 deletions res/values-es/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Traditional T9</string>
<string name="ime_name">Traditional T9</string>
<string name="ime_number">Números</string>
<string name="pref_inputmode">Modo de entrada por defecto</string>
<string name="pref_inputmode_desc">Modo por defecto usado para entrada \'normal\' de texto</string>
<string name="traditionalt9_settings">Configuración de Traditional T9</string>
<string name="main_left_insert">Insertar símbolo</string>
<string name="main_left_addword">Agregar palabra</string>
<string name="main_mid">Aceptar</string>
<string name="main_mid_commit">Confirmar</string>
<string name="main_right_upper">Modo ciclico</string>
<string name="main_right_lower">Options</string>
<string name="main_left_notfound">¿Agregar palabra?</string>
<string name="ricon_desc">Mantener icono</string>
<string name="symbol_next">Página sig.</string>
<string name="symbol_prev">Página prev.</string>
<string name="symbol_insert">Insertar símbolo</string>
<string name="smiley_insert">Insertar sonrisa</string>
<string name="symbol_page">Página: %1$s/%2$s</string>

<string name="add_word">Agregar palabra</string>
<string name="close">Cerrar</string>
<string name="add_word_blank">Palabra en blanco no agregada.</string>
<string name="add_word_badchar">No puedo agregar una palabra cn un caracter no mapeabe %1$s (%2$s).</string>
<string name="add_word_exist1">La palabra (%1$s) ya esta en la BDD.</string>
<string name="add_word_exist2">La palabra (%1$s) ya esta en la BDD por %2$s.</string>
<string name="title_activity_add_word">Agregar palabra</string>
<string name="action_settings">Configuración</string>
<string name="database_notready">Base de datos no disponible.</string>
<string name="database_settings_notready">Base de datos no disponible. Usando configuración por defecto.</string>

<string name="updating_database_title">Actualizando base de datos del diccionario…</string>
<string name="updating_database">Actualizando base de datos del diccionario, puede tardar un rato.</string>
<string name="updating_database_done">Completada la actualizacion de la base de datos del diccionario.</string>
<string name="updating_database_unavailable">Actualizando base de datos del diccionario, el ingreso de palabras no estará disponible de momento.</string>

<string name="pref_lang_title">Soporte multilenguaje…</string>
<string name="pref_help">"Mostrar ayuda</string>
<string name="pref_loaddict">Cargar diccionario</string>
<string name="pref_loaduserdict">Cargar diccionario de usuario</string>

<string name="pref_nukedict">Asesinar diccionario</string>
<string name="pref_backupdict">Resguardar diccionario</string>
<string name="pref_restoredict">Restarurar diccionario</string>
<string name="pref_querytest">Query test</string>
<string name="pref_testfunc">Test func</string>

<string name="pref_mode_notify">Modo de notificaciones</string>
<string name="pref_mode_notify_subtitle">Se utiliza para la representación de los cambios de modo</string>

<string name="pref_loadingdict">Cargando diccionario…</string>
<string name="pref_loadinguserdict">Cargando diccionario de usuario…</string>
<string name="pref_load_title">Cargar diccionario IME</string>
<string name="pref_loadingbackup">Restaurando diccionario…</string>
<string name="pref_savingbackup">Resguardando diccionario…</string>
<string name="pref_nukingdict">Asesinando diccionario… Por favor esepere…</string>
<string name="pref_loaduser_notfound">El diccionario para %1$s no se encuentra. No se cargará.</string>

<string name="pref_backup_warn">Advertencia: Existe una copia de seguridad ¿Desea reemplazarla?</string>
<string name="pref_backup_title">Resguardad base de datos IME</string>
<string name="pref_backup_noext">Error: No hay almacenamiento externo disponible para la copia de seguridad. La copia de seguridad no continuará.</string>
<string name="pref_restore_warn">Las entradas de la base de datos de respaldo sobrescribirán las entradas de la base de datos existentes. Las entradas que no estén en la copia de seguridad se conservarán. Si ese no es el comportamiento deseado, seleccione \"%1$s\" antes de seleccionar esta opción.</string>
<string name="pref_restore_title">Restaurar base de datos IME</string>
<string name="pref_restore_noext">Error: No hay almacenamiento externo disponible para la restauración. La restauración no continuará.</string>
<string name="pref_restore_nofile">Error: archivo de copia de respaldo no disponible.</string>
<string name="pref_nuke_warn">Advertencia: Esto borrará todo su diccionario. ¿Desea continuar?</string>
<string name="pref_nuke_title">Asesinar diccionario IME</string>
<string name="pref_reloadKeys">Recargar KeyMap</string>

<string name="hello_world">¡Hola mundo!</string>


</resources>
2 changes: 2 additions & 0 deletions res/values/arrays.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<item>French</item>
<item>Italian</item>
<item>Ukrainian</item>
<item>Spanish</item>
</string-array>
<!--pref_lang_titles pair with pref_lang_values -->
<integer-array translatable="false" name="pref_lang_values">
Expand All @@ -27,6 +28,7 @@
<item>@integer/LANG_FR</item>
<item>@integer/LANG_IT</item>
<item>@integer/LANG_UK</item>
<item>@integer/LANG_ES</item>
</integer-array>

<string-array name="capsMode">
Expand Down
3 changes: 2 additions & 1 deletion res/values/const.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
<integer name="LANG_FR">8</integer>
<integer name="LANG_IT">16</integer>
<integer name="LANG_UK">32</integer>

<integer name="LANG_ES">64</integer>

<integer name="INPUT_DICT">0</integer>
<integer name="INPUT_TEXT">1</integer>
<integer name="INPUT_NUM">2</integer>
Expand Down
29 changes: 21 additions & 8 deletions src/org/nyanya/android/traditionalt9/CharMap.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,10 @@ public class CharMap {
enMap.put('€', 1); enMap.put('ß', 7); // German chars
enMap.put('æ', 1); enMap.put('î', 4); enMap.put('ù', 8); enMap.put('œ', 6); // French chars
enMap.put('ì', 4); enMap.put('ò', 8); // Italian chars
Map<Character, Integer> endefritmap = Collections.unmodifiableMap(enMap);
CHARTABLE.add(0, endefritmap);
enMap.put('ú', 4); enMap.put('ç', 8); // Spanish chars + ç
Map<Character, Integer> endefritesmap = Collections.unmodifiableMap(enMap);
CHARTABLE.add(0, endefritesmap);


// Russian
Map<Character, Integer> ruMap = new HashMap<Character, Integer>();
Expand Down Expand Up @@ -80,10 +82,11 @@ public class CharMap {
// etc
CHARTABLE.add(1, Collections.unmodifiableMap(ruMap));

CHARTABLE.add(2, Collections.unmodifiableMap(endefritmap));
CHARTABLE.add(3, Collections.unmodifiableMap(endefritmap));
CHARTABLE.add(4, Collections.unmodifiableMap(endefritmap));
CHARTABLE.add(2, Collections.unmodifiableMap(endefritesmap));
CHARTABLE.add(3, Collections.unmodifiableMap(endefritesmap));
CHARTABLE.add(4, Collections.unmodifiableMap(endefritesmap));
CHARTABLE.add(5, Collections.unmodifiableMap(ruMap));
CHARTABLE.add(6, Collections.unmodifiableMap(endefritesmap));
}

protected static final char[][] ENT9TABLE = { { '0', '+' },
Expand Down Expand Up @@ -143,8 +146,17 @@ public class CharMap {
{ 'р', 'с', 'т', 'у', 'Р', 'С', 'Т', 'У', '6' }, { 'ф', 'х', 'ц', 'ч', 'Ф', 'Х', 'Ц', 'Ч', '7' },
{ 'ш', 'щ', 'Ш', 'Щ', '8' }, { 'ь', 'ю', 'я', 'Ь', 'Ю', 'Я', '9' },
{ ' ', '\n' }, { ' ', '0', '+' }, { '\n' } }; // LAST TWO SPACE ON 0

protected static final char[][][] T9TABLE = { ENT9TABLE, RUT9TABLE, DET9TABLE, FRT9TABLE, ITT9TABLE, UKT9TABLE };

protected static final char[][] EST9TABLE = {
{ '+', '0' },
{ '.', ',', '?', '!', ':', ';', '"', '/', '-', '@', '^', '€', '$', '%', '&', '*', '#', '(', ')', '_', '1' },
{ 'a', 'b', 'c', 'A', 'B', 'C', 'á', 'Á', '2' }, { 'd', 'e', 'f', 'D', 'E', 'F', 'é', 'É', '3' },
{ 'g', 'h', 'i', 'G', 'H', 'I', 'í', 'Í', '4' }, { 'j', 'k', 'l', 'J', 'K', 'L', '5' },
{ 'm', 'n', 'ñ', 'o', 'M', 'N', 'Ñ', 'O', 'ó', 'Ó', '6' }, { 'p', 'q', 'r', 's', 'P', 'Q', 'R', 'S', '7' },
{ 't', 'u', 'v', 'T', 'U', 'V', 'ú', 'Ú', '8' }, { 'w', 'x', 'y', 'z', 'W', 'X', 'Y', 'Z', '9' },
{ ' ', '\n' }, { ' ', '0', '+' }, { '\n' } }; // LAST TWO SPACE ON 0

protected static final char[][][] T9TABLE = { ENT9TABLE, RUT9TABLE, DET9TABLE, FRT9TABLE, ITT9TABLE, UKT9TABLE, EST9TABLE };

// last 2 don't matter, are for spaceOnZero extra 'slots' 0 position, and 10 position
protected static final int[] ENT9CAPSTART = { 0, 0, 3, 3, 3, 3, 3, 4, 3, 4, 0, 0, 0 };
Expand All @@ -153,7 +165,8 @@ public class CharMap {
protected static final int[] FRT9CAPSTART = { 0, 0, 3, 3, 3, 3, 3, 4, 3, 4, 0, 0, 0 };
protected static final int[] ITT9CAPSTART = { 0, 0, 3, 3, 3, 3, 3, 4, 3, 4, 0, 0, 0 };
protected static final int[] UKT9CAPSTART = { 0, 0, 5, 5, 6, 4, 4, 4, 2, 3, 0, 0, 0 };
protected static final int[][] T9CAPSTART = {ENT9CAPSTART, RUT9CAPSTART, DET9CAPSTART, FRT9CAPSTART, ITT9CAPSTART, UKT9CAPSTART};
protected static final int[] EST9CAPSTART = { 0, 0, 3, 3, 3, 3, 3, 4, 3, 4, 0, 0, 0 };
protected static final int[][] T9CAPSTART = {ENT9CAPSTART, RUT9CAPSTART, DET9CAPSTART, FRT9CAPSTART, ITT9CAPSTART, UKT9CAPSTART, EST9CAPSTART};

protected static String getStringSequence(String word, LANGUAGE lang) {
StringBuilder seq = new StringBuilder();
Expand Down
13 changes: 10 additions & 3 deletions src/org/nyanya/android/traditionalt9/LangHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@

public class LangHelper {
protected static final Locale RUSSIAN = new Locale("ru","RU");
protected static final Locale UKRAINIAN = new Locale("uk","UA");
protected static final Locale UKRAINIAN = new Locale("uk","UA");
protected static final Locale SPANISH =new Locale("es", "AR");
public enum LANGUAGE {
// MAKE SURE THESE MATCH WITH values/const.xml
// (index, id) Where index is index in arrays like LOCALES and MUST increment and MUST be in
// the same order as arrays.xml/pref_lang_values, and id is the identifier used in
// the database and such. id should never change unless database update is done.
// id MUST increment in doubles (as the enabled languages are stored as an integer)
NONE(-1, -1), EN(0,1), RU(1,2), DE(2,4), FR(3,8), IT(4,16), UK(5,32);
NONE(-1, -1), EN(0,1), RU(1,2), DE(2,4), FR(3,8), IT(4,16), UK(5,32), ES(6,64);
public final int index;
public final int id;
// lookup map
Expand All @@ -26,7 +27,7 @@ public enum LANGUAGE {
public static LANGUAGE get(int i) { return lookup.get(i);}
}

protected static final Locale[] LOCALES = {Locale.ENGLISH, RUSSIAN, Locale.GERMAN, Locale.FRENCH, Locale.ITALIAN, UKRAINIAN};
protected static final Locale[] LOCALES = {Locale.ENGLISH, RUSSIAN, Locale.GERMAN, Locale.FRENCH, Locale.ITALIAN, UKRAINIAN,SPANISH};

public static final int LANG_DEFAULT = LANGUAGE.EN.id;

Expand Down Expand Up @@ -79,6 +80,12 @@ protected static int getIndex(LANGUAGE l) {
{R.drawable.ime_ru_text_lower, R.drawable.ime_ru_text_single, R.drawable.ime_ru_text_upper}, //TEXT
{R.drawable.ime_number}, //NUM
},
{
// Spanish resources
{R.drawable.ime_es_lang_lower, R.drawable.ime_es_lang_single, R.drawable.ime_es_lang_upper}, //LANG
{R.drawable.ime_en_text_lower, R.drawable.ime_en_text_single, R.drawable.ime_en_text_upper}, //TEXT
{R.drawable.ime_number}, //NUM
},
};

public static LANGUAGE[] buildLangs(int i) {
Expand Down
18 changes: 18 additions & 0 deletions store-res/playstore-es.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Title
Traditional T9 Keypad IME


Full description
Método de entrada predictivo T9 usando su teclado numérico de botones físicos. No es un teclado en pantalla.
Solo tiene sentido en un teléfono con teclado numérico de botones físicos.
Solo permite escribir con teclado numérico de botones físicos.
Vea el sitio web para ayuda y soporte.

Soporte Multillingue (Inglés, Ruso, Alemán, Frances y Español)


Short description
Entrada de texto predictiva T9 usando su el teclado numérico de botones físicos de su teléfono! (Inglés, Ruso, Alemán, Frances y Español)


Vea github para la historia y más informacion.