mirror of
https://github.com/oxen-io/session-android.git
synced 2025-12-30 09:07:13 +00:00
Extract TextSecure strings for i18n.
1) Change all instances which use concatenation to build strings with variables in them to use string formatting instead. 2) Extract all string literals from layouts and menus into strings.xml 3) Extract all string literals from code into strings.xml
This commit is contained in:
@@ -62,11 +62,10 @@ public class VerifyIdentityActivity extends KeyVerifyingActivity {
|
||||
protected void handleVerified() {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||
builder.setIcon(android.R.drawable.ic_dialog_alert);
|
||||
builder.setTitle("Mark Identity Verified?");
|
||||
builder.setMessage("Are you sure you have validated the recipients' identity fingerprint " +
|
||||
"and would like to mark it as verified?");
|
||||
builder.setTitle(R.string.mark_identity_verified_question);
|
||||
builder.setMessage(R.string.are_you_sure_you_have_validated_the_recipients_identity_fingerprint_and_would_like_to_mark_it_as_verified);
|
||||
|
||||
builder.setPositiveButton("Mark Verified", new DialogInterface.OnClickListener() {
|
||||
builder.setPositiveButton(R.string.mark_verified, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
SessionRecord sessionRecord = new SessionRecord(VerifyIdentityActivity.this,
|
||||
@@ -92,7 +91,7 @@ public class VerifyIdentityActivity extends KeyVerifyingActivity {
|
||||
|
||||
private void initializeLocalIdentityKey() {
|
||||
if (!IdentityKeyUtil.hasIdentityKey(this)) {
|
||||
localIdentityFingerprint.setText("You do not have an identity key.");
|
||||
localIdentityFingerprint.setText(R.string.you_do_not_have_an_identity_key);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -104,7 +103,7 @@ public class VerifyIdentityActivity extends KeyVerifyingActivity {
|
||||
IdentityKey identityKey = sessionRecord.getIdentityKey();
|
||||
|
||||
if (identityKey == null) {
|
||||
remoteIdentityFingerprint.setText("Recipient has no identity key.");
|
||||
remoteIdentityFingerprint.setText(R.string.recipient_has_no_identity_key);
|
||||
} else {
|
||||
remoteIdentityFingerprint.setText(identityKey.getFingerprint());
|
||||
}
|
||||
@@ -125,7 +124,7 @@ public class VerifyIdentityActivity extends KeyVerifyingActivity {
|
||||
@Override
|
||||
protected void initiateDisplay() {
|
||||
if (!IdentityKeyUtil.hasIdentityKey(this)) {
|
||||
Toast.makeText(this, "You don't have an identity key!", Toast.LENGTH_LONG).show();
|
||||
Toast.makeText(this, R.string.you_don_t_have_an_identity_key_exclamation, Toast.LENGTH_LONG).show();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -138,7 +137,7 @@ public class VerifyIdentityActivity extends KeyVerifyingActivity {
|
||||
IdentityKey identityKey = sessionRecord.getIdentityKey();
|
||||
|
||||
if (identityKey == null) {
|
||||
Toast.makeText(this, "Recipient has no identity key!", Toast.LENGTH_LONG);
|
||||
Toast.makeText(this, R.string.recipient_has_no_identity_key_exclamation, Toast.LENGTH_LONG).show();
|
||||
} else {
|
||||
super.initiateScan();
|
||||
}
|
||||
@@ -146,12 +145,12 @@ public class VerifyIdentityActivity extends KeyVerifyingActivity {
|
||||
|
||||
@Override
|
||||
protected String getScanString() {
|
||||
return "Scan their key to compare";
|
||||
return getString(R.string.scan_their_key_to_compare);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getDisplayString() {
|
||||
return "Get my key scanned";
|
||||
return getString(R.string.get_my_key_scanned);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -167,21 +166,21 @@ public class VerifyIdentityActivity extends KeyVerifyingActivity {
|
||||
|
||||
@Override
|
||||
protected String getNotVerifiedMessage() {
|
||||
return "WARNING, the scanned key DOES NOT match! Please check the fingerprint text carefully.";
|
||||
return getString(R.string.warning_the_scanned_key_does_not_match_please_check_the_fingerprint_text_carefully);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getNotVerifiedTitle() {
|
||||
return "NOT Verified!";
|
||||
return getString(R.string.not_verified_exclamation);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getVerifiedMessage() {
|
||||
return "Their key is correct. It is also necessary to verify your key with them as well.";
|
||||
return getString(R.string.their_key_is_correct_it_is_also_necessary_to_verify_your_key_with_them_as_well);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getVerifiedTitle() {
|
||||
return "Verified!";
|
||||
return getString(R.string.verified_exclamation);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user