mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-30 10:26:58 +01:00
don't refuse to delete local translation
This commit is contained in:
parent
9bf92257b9
commit
dbaa28de5e
2 changed files with 7 additions and 6 deletions
|
@ -72,10 +72,7 @@ public class LocItemEditDelegate extends DelegateBase {
|
||||||
protected void onPause()
|
protected void onPause()
|
||||||
{
|
{
|
||||||
// Save any local translation
|
// Save any local translation
|
||||||
CharSequence txt = m_edit.getText();
|
LocUtils.setXlation( m_activity, m_key, m_edit.getText() );
|
||||||
if ( null != txt && 0 < txt.length() ) {
|
|
||||||
LocUtils.setXlation( m_activity, m_key, txt.toString() );
|
|
||||||
}
|
|
||||||
|
|
||||||
super.onPause();
|
super.onPause();
|
||||||
}
|
}
|
||||||
|
|
|
@ -225,10 +225,14 @@ public class LocUtils {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setXlation( Context context, String key, String txt )
|
public static void setXlation( Context context, String key, CharSequence txt )
|
||||||
{
|
{
|
||||||
loadXlations( context );
|
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,
|
protected static String getLocalXlation( Context context, String key,
|
||||||
|
|
Loading…
Reference in a new issue