Android: replace hardcoded strings with Android strings, allowing translations

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28518 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Maurus Cuelenaere 2010-11-06 02:02:58 +00:00
parent 13f7dffb09
commit f20582442f
3 changed files with 5 additions and 3 deletions

View file

@ -8,4 +8,6 @@
<string name="KbdInputTitle">Rockbox Keyboard Input</string> <string name="KbdInputTitle">Rockbox Keyboard Input</string>
<string name="Yes">Yes</string> <string name="Yes">Yes</string>
<string name="No">No</string> <string name="No">No</string>
<string name="error_extraction">Error occured during extraction!</string>
<string name="rockbox_extracting">Rockbox is loading. Please wait...</string>
</resources> </resources>

View file

@ -55,7 +55,7 @@ public class RockboxActivity extends Activity
private void createProgressDialog() private void createProgressDialog()
{ {
loadingdialog = new ProgressDialog(RockboxActivity.this); loadingdialog = new ProgressDialog(RockboxActivity.this);
loadingdialog.setMessage("Rockbox is loading. Please wait..."); loadingdialog.setMessage(getString(R.string.rockbox_extracting));
loadingdialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL); loadingdialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
loadingdialog.setIndeterminate(true); loadingdialog.setIndeterminate(true);
loadingdialog.setCancelable(false); loadingdialog.setCancelable(false);

View file

@ -207,7 +207,7 @@ public class RockboxService extends Service
e.printStackTrace(); e.printStackTrace();
if (resultReceiver != null) { if (resultReceiver != null) {
Bundle bundle = new Bundle(); Bundle bundle = new Bundle();
bundle.putString("error", "Error occured during extraction!"); bundle.putString("error", getString(R.string.error_extraction));
resultReceiver.send(RESULT_ERROR_OCCURED, bundle); resultReceiver.send(RESULT_ERROR_OCCURED, bundle);
} }
} }