Extracted strings

This commit is contained in:
fkloft 2013-07-26 20:10:43 +02:00
parent ffad17a33d
commit 2ed74acd6f
5 changed files with 19 additions and 12 deletions

View File

@ -47,9 +47,9 @@
<string name="pref_press_twice_to_exit">Press back button twice to exit</string> <string name="pref_press_twice_to_exit">Press back button twice to exit</string>
<string name="pref_press_twice_to_exit_sum">Avoids accidental exits</string> <string name="pref_press_twice_to_exit_sum">Avoids accidental exits</string>
<string name="pref_developer_options">Developer options</string> <string name="pref_developer_options">Developer options</string>
<string name="pref_enable_dev_mode">Enable developer mode</string> <string name="pref_enable_dev_mode">Enable developer mode</string>
<string name="pref_enable_dev_mode_sum">If enabled, all IITC sources will be loaded from external storage of the Android device. <string name="pref_enable_dev_mode_sum">If enabled, all IITC sources will be loaded from external storage of the Android device.
Please copy all sources from $IITC_folder/build/mobile/ to /sdcard/IITC_Mobile/dev/.</string> Please copy all sources from $IITC_folder/build/mobile/ to /sdcard/IITC_Mobile/dev/.</string>
<string name="pref_select_iitc">IITC source</string> <string name="pref_select_iitc">IITC source</string>
<string name="pref_select_iitc_sum">Load IITC main script from url or use local script. Currently used source:</string> <string name="pref_select_iitc_sum">Load IITC main script from url or use local script. Currently used source:</string>
@ -60,8 +60,14 @@
<string name="menu_faction">Faction</string> <string name="menu_faction">Faction</string>
<string name="menu_info">Info</string> <string name="menu_info">Info</string>
<string name="menu_debug">Debug</string> <string name="menu_debug">Debug</string>
<string name="menu_search">Search</string>
<string name="choose_account_to_login">Choose account to login</string> <string name="choose_account_to_login">Choose account to login</string>
<string name="login_failed">Login failed.</string> <string name="login_failed">Login failed.</string>
<string name="search_hint">Search Locations</string> <string name="search_hint">Search Locations</string>
<string name="menu_search">Search</string> <string name="intent_error">Address could not be opened</string>
<string name="msg_copied">Copied to clipboard…</string>
<string name="tab_map">Map</string>
<string name="tab_share">Share</string>
<string name="tab_browser">Browser</string>
</resources> </resources>

View File

@ -189,7 +189,7 @@ public class IITC_Mobile extends Activity {
} catch (URISyntaxException e) { } catch (URISyntaxException e) {
e.printStackTrace(); e.printStackTrace();
new AlertDialog.Builder(this) new AlertDialog.Builder(this)
.setTitle("Address could not be opened") .setTitle(R.string.intent_error)
.setMessage(e.getReason()) .setMessage(e.getReason())
.setNeutralButton(android.R.string.ok, new DialogInterface.OnClickListener() { .setNeutralButton(android.R.string.ok, new DialogInterface.OnClickListener() {
@Override @Override

View File

@ -21,7 +21,7 @@ public class IntentFragment extends Fragment implements OnScrollListener, OnItem
} }
public String getTitle() { public String getTitle() {
return getArguments().getString("title"); return getActivity().getString(getArguments().getInt("title"));
} }
@Override @Override

View File

@ -7,6 +7,7 @@ import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.widget.Toast; import android.widget.Toast;
import com.cradle.iitc_mobile.R;
public class SendToClipboard extends Activity { public class SendToClipboard extends Activity {
@Override @Override
@ -20,7 +21,7 @@ public class SendToClipboard extends Activity {
ClipData clip = ClipData.newPlainText("Copied Text ", text); ClipData clip = ClipData.newPlainText("Copied Text ", text);
clipboard.setPrimaryClip(clip); clipboard.setPrimaryClip(clip);
Toast.makeText(this, "Copied to clipboard…", Toast.LENGTH_SHORT).show(); Toast.makeText(this, R.string.msg_copied, Toast.LENGTH_SHORT).show();
finish(); finish();
setResult(RESULT_OK); setResult(RESULT_OK);

View File

@ -20,12 +20,12 @@ public class ShareActivity extends FragmentActivity implements ActionBar.TabList
IntentFragmentAdapter mFragmentAdapter; IntentFragmentAdapter mFragmentAdapter;
ViewPager mViewPager; ViewPager mViewPager;
private void addTab(Intent intent, String label, int icon) private void addTab(Intent intent, int label, int icon)
{ {
IntentFragment fragment = new IntentFragment(); IntentFragment fragment = new IntentFragment();
Bundle args = new Bundle(); Bundle args = new Bundle();
args.putParcelable("intent", intent); args.putParcelable("intent", intent);
args.putString("title", label); args.putInt("title", label);
args.putInt("icon", icon); args.putInt("icon", icon);
fragment.setArguments(args); fragment.setArguments(args);
mFragmentAdapter.add(fragment); mFragmentAdapter.add(fragment);
@ -44,14 +44,14 @@ public class ShareActivity extends FragmentActivity implements ActionBar.TabList
intent.setType("text/plain"); intent.setType("text/plain");
intent.putExtra(Intent.EXTRA_TEXT, getUrl()); intent.putExtra(Intent.EXTRA_TEXT, getUrl());
intent.putExtra(Intent.EXTRA_SUBJECT, mTitle); intent.putExtra(Intent.EXTRA_SUBJECT, mTitle);
addTab(intent, "Share", R.drawable.share); addTab(intent, R.string.tab_share, R.drawable.share);
String geoUri = "geo:" + mLl; String geoUri = "geo:" + mLl;
intent = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse(geoUri)); intent = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse(geoUri));
addTab(intent, "Map", R.drawable.location_map); addTab(intent, R.string.tab_map, R.drawable.location_map);
intent = new Intent(Intent.ACTION_VIEW, Uri.parse(getUrl())); intent = new Intent(Intent.ACTION_VIEW, Uri.parse(getUrl()));
addTab(intent, "Browser", R.drawable.browser); addTab(intent, R.string.tab_browser, R.drawable.browser);
} }
@Override @Override