don't refuse to delete local translation

This commit is contained in:
Eric House 2014-05-20 07:00:03 -07:00
parent 9bf92257b9
commit dbaa28de5e
2 changed files with 7 additions and 6 deletions

View file

@ -72,10 +72,7 @@ public class LocItemEditDelegate extends DelegateBase {
protected void onPause()
{
// Save any local translation
CharSequence txt = m_edit.getText();
if ( null != txt && 0 < txt.length() ) {
LocUtils.setXlation( m_activity, m_key, txt.toString() );
}
LocUtils.setXlation( m_activity, m_key, m_edit.getText() );
super.onPause();
}

View file

@ -225,10 +225,14 @@ public class LocUtils {
return result;
}
public static void setXlation( Context context, String key, String txt )
public static void setXlation( Context context, String key, CharSequence txt )
{
loadXlations( context );
s_xlationsLocal.put( key, txt );
if ( null == txt || 0 == txt.length() ) {
s_xlationsLocal.remove( key );
} else {
s_xlationsLocal.put( key, txt.toString() );
}
}
protected static String getLocalXlation( Context context, String key,