Extracted remaining strings

This commit is contained in:
str4d
2014-07-08 00:05:40 +00:00
parent db21839748
commit 27fe9f06d8
9 changed files with 27 additions and 15 deletions

View File

@@ -196,7 +196,7 @@ public class EmailListFragment extends ListFragment implements
mPasswordInput = (EditText) promptView.findViewById(R.id.passwordInput);
mPasswordError = (TextView) promptView.findViewById(R.id.passwordError);
builder.setPositiveButton("OK", new DialogInterface.OnClickListener() {
builder.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int id) {
InputMethodManager imm = (InputMethodManager) EmailListFragment.this
@@ -205,7 +205,7 @@ public class EmailListFragment extends ListFragment implements
dialog.dismiss();
new PasswordWaiter().execute();
}
}).setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
}).setNegativeButton(android.R.string.cancel, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int id) {
setEmptyText(getResources().getString(

View File

@@ -47,6 +47,6 @@ public class NetworkInfoFragment extends Fragment {
Exception e = I2PBote.getInstance().getConnectError();
if (e != null)
((TextView) view.findViewById(R.id.error)).setText(e.toString());
((TextView) view.findViewById(R.id.error)).setText(e.getLocalizedMessage());
}
}

View File

@@ -62,7 +62,7 @@ public class ViewEmailFragment extends Fragment {
displayEmail(e, v);
} else {
TextView subject = (TextView) v.findViewById(R.id.email_subject);
subject.setText("Email not found");
subject.setText(R.string.email_not_found);
}
} catch (PasswordException e) {
// TODO: Handle

View File

@@ -121,10 +121,11 @@ public class EditContactFragment extends EditPictureFragment {
i.addCategory(Intent.CATEGORY_OPENABLE);
try {
startActivityForResult(
Intent.createChooser(i, "Select file containing Email Destination"),
Intent.createChooser(i,
getResources().getString(R.string.select_email_destination_file)),
REQUEST_DESTINATION_FILE);
} catch (android.content.ActivityNotFoundException ex) {
Toast.makeText(getActivity(), "Please install a File Manager.",
Toast.makeText(getActivity(), R.string.please_install_a_file_manager,
Toast.LENGTH_SHORT).show();
}
}
@@ -268,11 +269,11 @@ public class EditContactFragment extends EditPictureFragment {
try {
mDestinationField.setText(br.readLine());
} catch (IOException ioe) {
Toast.makeText(getActivity(), "Failed to read Email Destination file.",
Toast.makeText(getActivity(), R.string.failed_to_read_email_destination_file,
Toast.LENGTH_SHORT).show();
}
} catch (FileNotFoundException fnfe) {
Toast.makeText(getActivity(), "Could not find Email Destination file.",
Toast.makeText(getActivity(), R.string.could_not_find_email_destination_file,
Toast.LENGTH_SHORT).show();
}
}

View File

@@ -308,7 +308,7 @@ public abstract class IdentityShipFragment extends Fragment {
try {
startActivityForResult(i, SELECT_IMPORT_FILE);
} catch (android.content.ActivityNotFoundException ex) {
Toast.makeText(getActivity(), "Please install a File Manager.",
Toast.makeText(getActivity(), R.string.please_install_a_file_manager,
Toast.LENGTH_SHORT).show();
}
}

View File

@@ -285,9 +285,9 @@ public class SettingsActivity extends PreferenceActivity {
routerChoice.setKey("i2pbote.router.use");
routerChoice.setEntries(R.array.routerOptionNames);
routerChoice.setEntryValues(R.array.routerOptions);
routerChoice.setTitle("Router");
routerChoice.setTitle(R.string.pref_title_router);
routerChoice.setSummary("%s");
routerChoice.setDialogTitle("Router to use");
routerChoice.setDialogTitle(R.string.pref_dialog_title_router);
routerChoice.setDefaultValue("internal");
return routerChoice;
}

View File

@@ -127,7 +127,6 @@ public class IntroActivity extends ActionBarActivity {
b.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
// TODO start setup wizard
getActivity().setResult(Activity.RESULT_OK);
getActivity().finish();
}

View File

@@ -33,7 +33,7 @@ public class EditPictureFragment extends Fragment {
Intent i = new Intent(Intent.ACTION_GET_CONTENT);
i.setType("image/*");
startActivityForResult(
Intent.createChooser(i, "Select a picture"),
Intent.createChooser(i, getResources().getString(R.string.select_a_picture)),
REQUEST_PICTURE_FILE);
}
});
@@ -88,7 +88,8 @@ public class EditPictureFragment extends Fragment {
List<ResolveInfo> list = getActivity().getPackageManager().queryIntentActivities(intent, 0);
if (list.size() == 0) {
Toast.makeText(getActivity(), "No image cropping app found", Toast.LENGTH_SHORT).show();
Toast.makeText(getActivity(), R.string.no_image_cropping_app_found, Toast.LENGTH_SHORT)
.show();
} else {
intent.setData(mPictureCaptureUri);
intent.putExtra("outputX", 72);
@@ -99,7 +100,8 @@ public class EditPictureFragment extends Fragment {
intent.putExtra("return-data", true);
startActivityForResult(
Intent.createChooser(intent, "Select a cropping app"),
Intent.createChooser(intent,
getResources().getString(R.string.select_a_cropping_app)),
CROP_PICTURE);
}
}