Skip to content

Commit 776e1d4

Browse files
authored
prepare for translation (#4467)
- Remove unused strings - extract hard-coded strings - add translation_description
1 parent 12be9d7 commit 776e1d4

File tree

2 files changed

+41
-39
lines changed

2 files changed

+41
-39
lines changed

firebase-appdistribution/src/main/java/com/google/firebase/appdistribution/impl/FirebaseAppDistributionImpl.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -523,11 +523,16 @@ private Task<Void> showUpdateConfirmationDialog(
523523
StringBuilder message =
524524
new StringBuilder(
525525
String.format(
526-
"Version %s (%s) is available.",
527-
newRelease.getDisplayVersion(), newRelease.getVersionCode()));
526+
context.getString(R.string.update_version_available),
527+
newRelease.getDisplayVersion(),
528+
newRelease.getVersionCode()));
528529

529530
if (newRelease.getReleaseNotes() != null && !newRelease.getReleaseNotes().isEmpty()) {
530-
message.append(String.format("\n\nRelease notes: %s", newRelease.getReleaseNotes()));
531+
message
532+
.append("\n\n")
533+
.append(context.getString(R.string.update_release_notes))
534+
.append(" ")
535+
.append(newRelease.getReleaseNotes());
531536
}
532537
updateConfirmationDialog.setMessage(message);
533538

firebase-appdistribution/src/main/res/values/strings.xml

Lines changed: 33 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -13,40 +13,37 @@
1313
<!-- limitations under the License. -->
1414

1515
<resources>
16-
<string name="signin_dialog_title">Enable testing features</string>
17-
<string name="singin_dialog_message">Enable testing features like new build alerts and in-app feedback.</string>
18-
<string name="singin_yes_button">Turn on</string>
19-
<string name="singin_no_button">Not now</string>
20-
<string name="no_update_available">No new release available, try calling checkForUpdate.</string>
21-
<string name="update_dialog_title">New Version Available</string>
22-
<string name="update_yes_button">Update</string>
23-
<string name="update_no_button">Cancel</string>
24-
<string name="downloading_app_update">Downloading in-app update…</string>
25-
<string name="download_completed">Download completed</string>
26-
<string name="download_failed">Download failed</string>
27-
<string name="download_pending">Download pending</string>
28-
<string name="install_failed">Install failed</string>
29-
<string name="install_canceled">Install canceled</string>
30-
<string name="update_canceled">Update canceled </string>
31-
<string name="notifications_group_name">Firebase App Distribution</string>
32-
<string name="app_update_notification_channel_name">App updates</string>
33-
<string name="app_update_notification_channel_description">Shows progress of in-app updates</string>
34-
<string name="feedback_launch_failed">Failed to launch feedback</string>
35-
<string name="feedback_unidentified_release">Release not found. This app may not have been installed by App Distribution, or you may no longer have access.</string>
36-
<string name="feedback_no_release">Would have sent feedback, but did not due to development mode.</string>
37-
<string name="feedback_notification_channel_name">Feedback</string>
38-
<string name="feedback_notification_channel_description">Tap to leave feedback</string>
39-
<string name="feedback_notification_title">We want your feedback!</string>
40-
<string name="feedback_notification_text">Tap to leave feedback for %1$s</string>
41-
<string name="unknown_sources_dialog_title">Enable Unknown Sources</string>
42-
<string name="unknown_sources_dialog_description">To install the update enable unknown sources</string>
43-
<string name="unknown_sources_yes_button">Settings</string>
44-
<string name="back_button_description">Back</string>
45-
<string name="send_feedback">Send feedback</string>
46-
<string name="send_button_description">Send</string>
47-
<string name="sender">From: %1$s</string>
48-
<string name="feedback_text_hint">Have feedback? Let us know how we can make this app better.</string>
49-
<string name="screenshot">Screenshot</string>
50-
<string name="no_screenshot">Screenshot (not available)</string>
51-
<string name="screenshot_image_description">Screenshot image</string>
16+
<string name="signin_dialog_title" translation_description="Title of the dialog encouraging the user to enable Firebase App Distribution features">Enable testing features</string>
17+
<string name="singin_dialog_message" translation_description="Content of the dialog encouraging the user to enable Firebase App Distribution features">Enable testing features like new build alerts and in-app feedback.</string>
18+
<string name="singin_yes_button" translation_description="Text on button to enable Firebase App Distribution features">Enable</string>
19+
<string name="singin_no_button" translation_description="Text on button to decline Firebase App Distribution features">Not now</string>
20+
<string name="update_dialog_title" translation_description="Title of the dialog explaining to the user that a new version of the application is available">New version available</string>
21+
<string name="update_version_available" translation_description="Version string (and code) of the available update">Version %1$s (%2$d) is available.</string>
22+
<string name="update_release_notes" translation_description="Text prefixing release notes">Release notes:</string>
23+
<string name="update_yes_button" translation_description="Text on button to start update">Update</string>
24+
<string name="update_no_button" translation_description="Text on button to cancel update">Cancel</string>
25+
<string name="downloading_app_update" translation_description="Title of the notification showing during download of update">Downloading in-app update…</string>
26+
<string name="download_completed" translation_description="Title of notification when download of update has completed">Download complete</string>
27+
<string name="download_failed" translation_description="Title of notification when download of update has failed">Download failed</string>
28+
<string name="install_failed" translation_description="Title of notification when installation of update has failed">Install failed</string>
29+
<string name="notifications_group_name" translation_description="Title of the notification channel group for the SDK">Firebase App Distribution</string>
30+
<string name="app_update_notification_channel_name" translation_description="Name of the notification channel for in-app updates">App updates</string>
31+
<string name="app_update_notification_channel_description" translation_description="Description of the notification channel for in-app updates">Shows progress of in-app updates</string>
32+
<string name="feedback_launch_failed" translation_description="Toast explaining that launching the feedback functionality failed">Failed to launch feedback</string>
33+
<string name="feedback_unidentified_release" translation_description="Toast explaining feedback can't be provided, because release can't be found">Release not found. This app may not have been installed by App Distribution, or you may no longer have access.</string>
34+
<string name="feedback_no_release" translation_description="Toast explaining that feedback would have been sent, but was not, since development mode was active">Would have sent feedback, but did not due to development mode.</string>
35+
<string name="feedback_notification_channel_name" translation_description="Name of the notification channel for in-app feedback">Feedback</string>
36+
<string name="feedback_notification_channel_description" translation_description="Description of the notification channel for in-app feedback">Shows notification to enter feedback about app</string>
37+
<string name="feedback_notification_title" translation_description="Title of notification encouraging testers to enter feedback">We want your feedback!</string>
38+
<string name="feedback_notification_text" translation_description="Text of notification encouraging testers to enter feedback for the app">Tap to enter feedback for %1$s</string>
39+
<string name="unknown_sources_dialog_title" translation_description="Title of dialog describing that installation from unknown sources needs to be enabled">Installation from unknown Sources</string>
40+
<string name="unknown_sources_dialog_description" translation_description="Text of dialog describing why installation from unknown sources needs to be enabled">To install the update, enable installation from unknown sources</string>
41+
<string name="unknown_sources_yes_button" translation_description="Label on button launching settings to enable installation from unknown sources">Settings</string>
42+
<string name="back_button_description" translation_description="Description for image button (back) which aborts feedback">Back</string>
43+
<string name="send_feedback" translation_description="Text next to send button which sends feedback">Send feedback</string>
44+
<string name="send_button_description" translation_description="Description of image button (send) which sends feedback">Send</string>
45+
<string name="feedback_text_hint" translation_description="Default text hint displayed in the text box where user should type their feedback">Have feedback? Let us know how we can make this app better.</string>
46+
<string name="screenshot" translation_description="Text displayed next to the checkbox which can be toggled to include/exclude a screenshot with the feedback">Screenshot</string>
47+
<string name="no_screenshot" translation_description="Text displayed when there is no screenshot available to be included with the feedback">Screenshot (not available)</string>
48+
<string name="screenshot_image_description" translation_description="Description for the screenshot image">Screenshot image</string>
5249
</resources>

0 commit comments

Comments
 (0)