mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-11 08:48:06 +01:00
add debug preference via which Translate menuitems must be enabled
This commit is contained in:
parent
0a3371a82f
commit
e643e9d5c0
6 changed files with 597 additions and 579 deletions
File diff suppressed because it is too large
Load diff
|
@ -114,6 +114,7 @@
|
||||||
<string name="key_enable_dup_invite">key_enable_dup_invite</string>
|
<string name="key_enable_dup_invite">key_enable_dup_invite</string>
|
||||||
<string name="key_download_path">key_download_path</string>
|
<string name="key_download_path">key_download_path</string>
|
||||||
<string name="key_xlations_locale">key_xlations_locale</string>
|
<string name="key_xlations_locale">key_xlations_locale</string>
|
||||||
|
<string name="key_xlations_enabled">key_xlations_enabled</string>
|
||||||
|
|
||||||
<!-- Nor is my email address -->
|
<!-- Nor is my email address -->
|
||||||
<string name="email_author_email">xwords@eehouse.org</string>
|
<string name="email_author_email">xwords@eehouse.org</string>
|
||||||
|
|
|
@ -2233,4 +2233,7 @@
|
||||||
|
|
||||||
<string name="new_xlations_fmt">Installed %1$d new translations</string>
|
<string name="new_xlations_fmt">Installed %1$d new translations</string>
|
||||||
|
|
||||||
|
<string name="xlations_enabled_title">Enable local translating</string>
|
||||||
|
<string name="xlations_enabled_summary">Add option to every screen menu</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -326,6 +326,12 @@
|
||||||
android:title="@string/xlations_locale"
|
android:title="@string/xlations_locale"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<CheckBoxPreference android:key="@string/key_xlations_enabled"
|
||||||
|
android:title="@string/xlations_enabled_title"
|
||||||
|
android:summary="@string/xlations_enabled_summary"
|
||||||
|
android:defaultValue="false"
|
||||||
|
/>
|
||||||
|
|
||||||
<!-- For broken devices like my Blaze 4G that report a download
|
<!-- For broken devices like my Blaze 4G that report a download
|
||||||
directory that doesn't exist, allow users to set it. Mine:
|
directory that doesn't exist, allow users to set it. Mine:
|
||||||
/sdcard/external_sd/download
|
/sdcard/external_sd/download
|
||||||
|
|
|
@ -434,4 +434,9 @@ public class XWPrefs {
|
||||||
{
|
{
|
||||||
return getPrefsString( context, R.string.key_xlations_locale );
|
return getPrefsString( context, R.string.key_xlations_locale );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean getXlationEnabled( Context context )
|
||||||
|
{
|
||||||
|
return getPrefsBoolean( context, R.string.key_xlations_enabled, false );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -320,7 +320,7 @@ public class LocUtils {
|
||||||
}
|
}
|
||||||
|
|
||||||
// The caller is loc-aware, so add our menu -- at the top level!
|
// The caller is loc-aware, so add our menu -- at the top level!
|
||||||
if ( 0 == depth ) {
|
if ( 0 == depth && XWPrefs.getXlationEnabled( activity ) ) {
|
||||||
String title = getString( activity, R.string.loc_menu_xlate );
|
String title = getString( activity, R.string.loc_menu_xlate );
|
||||||
menu.add( title )
|
menu.add( title )
|
||||||
.setOnMenuItemClickListener( new OnMenuItemClickListener() {
|
.setOnMenuItemClickListener( new OnMenuItemClickListener() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue