Skip to content

Commit

Permalink
codinguser#876 - Toast message internationalization
Browse files Browse the repository at this point in the history
  • Loading branch information
JeanGarf committed Jun 16, 2020
1 parent 1e2d83a commit 1ee83dd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -372,15 +372,15 @@ public boolean onMenuItemClick(MenuItem item) {
// This is not the first Activity

Toast toast = Toast.makeText(this,
"You must be on the Account Page to change Book",
Toast.LENGTH_LONG);
R.string.toast_must_be_on_account_page_to_change_book,
Toast.LENGTH_LONG);

//
// Align-Center text inside the Toast
//

TextView toastTextView = (TextView) toast.getView()
.findViewById(android.R.id.message);
.findViewById(android.R.id.message);
if (toastTextView != null) {
toastTextView.setGravity(Gravity.CENTER);
}
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values-fr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -452,4 +452,5 @@
<string name="title_section_preferences">Préférences</string>
<string name="title_display_negative_signum_in_splits">Afficher le signe - dans les transactions splittées</string>
<string name="summary_display_negative_signum_in_splits">Autoriser l\'affichage du signe - même lorsque le bouton Débit/Crédit est affiché</string>
<string name="toast_must_be_on_account_page_to_change_book">Vous devez être sur la page des Comptes pour pouvoir changer de Comptabilité</string>
</resources>
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,7 @@
<item>INCOME</item>
</string-array>

<string name="toast_must_be_on_account_page_to_change_book">You must be on the Account Page to change Book</string>
<string name="toast_connected_to_google_drive">Connected to Google Drive</string>
<string name="toast_unable_to_connect_to_google_drive">Unable to connect to Google Drive</string>
<string name="toast_enter_amount_to_split">Please enter an amount to split</string>
Expand Down

0 comments on commit 1ee83dd

Please sign in to comment.