Commit 614b2b9b authored by Nicholas Verne's avatar Nicholas Verne Committed by Commit Bot

Updated strings for Crostini installer and uninstaller dialogs.

Now matching go/crostini-strings.

Bug: 849900
Change-Id: I019c4888b4e54df177158a0c566a6477088aca74
Reviewed-on: https://chromium-review.googlesource.com/1111742Reviewed-by: default avatarBen Wells <benwells@chromium.org>
Commit-Queue: Nicholas Verne <nverne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#569947}
parent 2a5e4260
......@@ -4937,73 +4937,75 @@
Bluetooth
</message>
<message name="IDS_CROSTINI_INSTALLER_TITLE" desc="Title of the Crostini installer, a dialog for installing the 'Terminal'.">
<ph name="APP_NAME">$1<ex>Terminal</ex></ph> for <ph name="DEVICE_TYPE">$2<ex>Chromebook</ex></ph>
<message name="IDS_CROSTINI_INSTALLER_TITLE" desc="Title of the Crostini installer, a dialog for installing Linux.">
Set up Linux on your <ph name="DEVICE_TYPE">$1<ex>Chromebook</ex></ph>
</message>
<message name="IDS_CROSTINI_INSTALLER_BODY" desc="Description for the Crostini installer, a dialog for installing the 'Terminal'.">
Develop on your <ph name="DEVICE_TYPE">$1<ex>Chromebook</ex></ph>. You can run your favorite native apps and command-line tools seamlessly and securely.
<message name="IDS_CROSTINI_INSTALLER_BODY" desc="Description for the Crostini installer, a dialog for installing Linux.">
Get tools for developing websites, Android apps, and more. Learn more
Installing the <ph name="APP_NAME">$2<ex>Terminal</ex></ph> will download <ph name="DOWNLOAD_SIZE">$3<ex>300MB</ex></ph> of data.
Installing Linux will download <ph name="DOWNLOAD_SIZE">$1<ex>300MB</ex></ph> of data.
</message>
<message name="IDS_CROSTINI_INSTALLER_INSTALL_BUTTON" desc="Label for the button in the Crostini installer dialog to begin installing the 'Terminal'.">
<message name="IDS_CROSTINI_INSTALLER_INSTALL_BUTTON" desc="Label for the button in the Crostini installer dialog to begin installing Linux.">
Install
</message>
<message name="IDS_CROSTINI_INSTALLER_INSTALLING" desc="Text shown in the Crostini installer dialog while the 'Terminal' is installing.">
Installing <ph name="APP_NAME">$1<ex>Terminal</ex></ph>...
<message name="IDS_CROSTINI_INSTALLER_INSTALLING" desc="Text shown in the Crostini installer dialog while Linux is installing.">
Installing Linux...
This process may take a few minutes.
</message>
<message name="IDS_CROSTINI_INSTALLER_ERROR_TITLE" desc="Title of the Crostini installer when an error occurs.">
Error installing <ph name="APP_NAME">$1<ex>Terminal</ex></ph>...
Error installing Linux...
</message>
<message name="IDS_CROSTINI_INSTALLER_COMPLETE" desc="Text shown in the Crostini installer dialog when installation is complete.">
Finished installing <ph name="APP_NAME">$1<ex>Terminal</ex></ph>.
Linux installation is complete.
</message>
<message name="IDS_CROSTINI_INSTALLER_LOAD_TERMINA_MESSAGE" desc="Text shown in the Crostini installer dialog when the VM component is loading">
Loading VM component.
Downloading the virtual machine.
</message>
<message name="IDS_CROSTINI_INSTALLER_START_CONCIERGE_MESSAGE" desc="Text shown in the Crostini installer dialog when the VM service is starting">
Starting VM service.
Starting the virtual machine.
</message>
<message name="IDS_CROSTINI_INSTALLER_CREATE_DISK_IMAGE_MESSAGE" desc="Text shown in the Crostini installer dialog when the disk image is being created">
Creating disk image.
Starting the virtual machine.
</message>
<message name="IDS_CROSTINI_INSTALLER_START_TERMINA_VM_MESSAGE" desc="Text shown in the Crostini installer dialog when the VM itself is starting">
Starting VM.
Starting the virtual machine.
</message>
<message name="IDS_CROSTINI_INSTALLER_START_CONTAINER_MESSAGE" desc="Text shown in the Crostini installer dialog when the container inside the VM is starting">
Starting container inside VM.
Starting the Linux container.
</message>
<message name="IDS_CROSTINI_INSTALLER_OFFLINE_ERROR" desc="Text shown in the Crostini installer dialog when there is no internet connection">
ERROR: Your <ph name="DEVICE_TYPE">$1<ex>Chromebook</ex></ph> must be connected to the Internet to install the <ph name="APP_NAME">$2<ex>Terminal</ex></ph>.
<ph name="DEVICE_TYPE">$1<ex>Chromebook</ex></ph> is offline. Connect to the Internet and try again.
</message>
<message name="IDS_CROSTINI_INSTALLER_LOAD_TERMINA_ERROR" desc="Text shown in the Crostini installer dialog when the VM component fails to load">
ERROR: Failed to load VM component.
Error downloading the virtual machine. Please try again.
</message>
<message name="IDS_CROSTINI_INSTALLER_START_CONCIERGE_ERROR" desc="Text shown in the Crostini installer dialog when the VM service fails to start">
ERROR: Failed to start VM service.
Error starting the virtual machine service. Please try again.
</message>
<message name="IDS_CROSTINI_INSTALLER_CREATE_DISK_IMAGE_ERROR" desc="Text shown in the Crostini installer dialog when the failing to create the disk image">
ERROR: Failed to create disk image.
Error creating disk image. Please try again.
</message>
<message name="IDS_CROSTINI_INSTALLER_START_TERMINA_VM_ERROR" desc="Text shown in the Crostini installer dialog when the VM itself fails to start">
ERROR: Failed to start VM.
Error starting the virtual machine. Please try again.
</message>
<message name="IDS_CROSTINI_INSTALLER_START_CONTAINER_ERROR" desc="Text shown in the Crostini installer dialog when the container fails to start inside the VM">
ERROR: Failed to start container inside VM.
The Linux container didn't start. Please try again.
</message>
<message name="IDS_CROSTINI_UNINSTALLER_TITLE" desc="Title of the Crostini uninstaller, a dialog for uninstalling the 'Terminal', the associated VM and Linux container.">
<ph name="APP_NAME">$1<ex>Uninstall Terminal</ex></ph> for <ph name="DEVICE_TYPE">$2<ex>Chromebook</ex></ph>
<message name="IDS_CROSTINI_UNINSTALLER_TITLE" desc="Title of the Crostini uninstaller, a dialog for uninstalling Linux, the associated VM and Linux files.">
Delete Linux
</message>
<message name="IDS_CROSTINI_UNINSTALLER_BODY" desc="Description for the Crostini uninstaller, a dialog for uninstalling the 'Terminal', the associated VM and Linux container.">
This will uninstall the <ph name="APP_NAME">$1<ex>Terminal</ex></ph>, and remove all Linux data and applications from your <ph name="DEVICE_TYPE">$2<ex>Chromebook</ex></ph>. Are you sure?
<message name="IDS_CROSTINI_UNINSTALLER_BODY" desc="Description for the Crostini uninstaller, a dialog for uninstalling Linux, the associated VM and Linux files.">
Delete all Linux applications and data in your Linux Files folder from this <ph name="DEVICE_TYPE">$1<ex>Chromebook</ex></ph>?
</message>
<message name="IDS_CROSTINI_UNINSTALLER_UNINSTALL_BUTTON" desc="Label for the button in the Crostini uninstaller dialog to uninstall the 'Terminal'.">
Uninstall
<message name="IDS_CROSTINI_UNINSTALLER_UNINSTALL_BUTTON" desc="Label for the button in the Crostini uninstaller dialog to uninstall Linux">
Delete
</message>
<message name="IDS_CROSTINI_UNINSTALLER_UNINSTALLING_MESSAGE" desc="Text shown in the Crostini installer dialog when the 'Terminal' uninstall is in progress.">
Uninstalling...
<message name="IDS_CROSTINI_UNINSTALLER_UNINSTALLING_MESSAGE" desc="Text shown in the Crostini installer dialog when Linux uninstall is in progress.">
Deleting...
</message>
<message name="IDS_CROSTINI_UNINSTALLER_ERROR" desc="Text shown in the Crostini uninstaller dialog when the 'Terminal' uninstall process fails.">
ERROR: Failed to uninstall <ph name="APP_NAME">$1<ex>Terminal</ex></ph>.
<message name="IDS_CROSTINI_UNINSTALLER_ERROR" desc="Text shown in the Crostini uninstaller dialog when the Linux uninstall process fails.">
Error uninstalling Linux. Please try again.
</message>
<!-- Time limit notification -->
......
......@@ -97,19 +97,16 @@ base::string16 CrostiniInstallerView::GetDialogButtonLabel(
base::string16 CrostiniInstallerView::GetWindowTitle() const {
if (state_ == State::PROMPT) {
const base::string16 device_type = ui::GetChromeOSDeviceName();
return l10n_util::GetStringFUTF16(IDS_CROSTINI_INSTALLER_TITLE, app_name_,
return l10n_util::GetStringFUTF16(IDS_CROSTINI_INSTALLER_TITLE,
device_type);
}
if (state_ == State::ERROR) {
return l10n_util::GetStringFUTF16(IDS_CROSTINI_INSTALLER_ERROR_TITLE,
app_name_);
return l10n_util::GetStringUTF16(IDS_CROSTINI_INSTALLER_ERROR_TITLE);
}
if (state_ == State::INSTALL_END) {
return l10n_util::GetStringFUTF16(IDS_CROSTINI_INSTALLER_COMPLETE,
app_name_);
return l10n_util::GetStringUTF16(IDS_CROSTINI_INSTALLER_COMPLETE);
}
return l10n_util::GetStringFUTF16(IDS_CROSTINI_INSTALLER_INSTALLING,
app_name_);
return l10n_util::GetStringUTF16(IDS_CROSTINI_INSTALLER_INSTALLING);
}
bool CrostiniInstallerView::ShouldShowCloseButton() const {
......@@ -132,7 +129,7 @@ bool CrostiniInstallerView::Accept() {
if (net::NetworkChangeNotifier::IsOffline()) {
const base::string16 device_type = ui::GetChromeOSDeviceName();
HandleError(l10n_util::GetStringFUTF16(IDS_CROSTINI_INSTALLER_OFFLINE_ERROR,
app_name_, device_type),
device_type),
SetupResult::kErrorOffline);
return false; // should not close the dialog.
}
......@@ -232,9 +229,7 @@ CrostiniInstallerView* CrostiniInstallerView::GetActiveViewForTesting() {
}
CrostiniInstallerView::CrostiniInstallerView(Profile* profile)
: app_name_(base::ASCIIToUTF16(kCrostiniTerminalAppName)),
profile_(profile),
weak_ptr_factory_(this) {
: profile_(profile), weak_ptr_factory_(this) {
views::LayoutProvider* provider = views::LayoutProvider::Get();
SetLayoutManager(std::make_unique<views::BoxLayout>(
views::BoxLayout::kVertical,
......@@ -247,7 +242,7 @@ CrostiniInstallerView::CrostiniInstallerView(Profile* profile)
// the UI has been fleshed out more.
const base::string16 device_type = ui::GetChromeOSDeviceName();
const base::string16 message = l10n_util::GetStringFUTF16(
IDS_CROSTINI_INSTALLER_BODY, device_type, app_name_,
IDS_CROSTINI_INSTALLER_BODY,
ui::FormatBytesWithUnits(kDownloadSizeInBytes, ui::DATA_UNITS_MEBIBYTE,
/*show_units=*/true));
message_label_ = new views::Label(message);
......
......@@ -91,7 +91,6 @@ class CrostiniInstallerView
State state_ = State::PROMPT;
views::Label* message_label_ = nullptr;
views::ProgressBar* progress_bar_ = nullptr;
base::string16 app_name_;
Profile* profile_;
crostini::CrostiniManager::RestartId restart_id_ =
crostini::CrostiniManager::kUninitializedRestartId;
......
......@@ -71,8 +71,7 @@ base::string16 CrostiniUninstallerView::GetDialogButtonLabel(
base::string16 CrostiniUninstallerView::GetWindowTitle() const {
const base::string16 device_type = ui::GetChromeOSDeviceName();
return l10n_util::GetStringFUTF16(IDS_CROSTINI_UNINSTALLER_TITLE, app_name_,
device_type);
return l10n_util::GetStringUTF16(IDS_CROSTINI_UNINSTALLER_TITLE);
}
bool CrostiniUninstallerView::ShouldShowCloseButton() const {
......@@ -119,9 +118,7 @@ CrostiniUninstallerView* CrostiniUninstallerView::GetActiveViewForTesting() {
}
CrostiniUninstallerView::CrostiniUninstallerView(Profile* profile)
: app_name_(base::ASCIIToUTF16(kCrostiniTerminalAppName)),
profile_(profile),
weak_ptr_factory_(this) {
: profile_(profile), weak_ptr_factory_(this) {
views::LayoutProvider* provider = views::LayoutProvider::Get();
SetLayoutManager(std::make_unique<views::BoxLayout>(
views::BoxLayout::kVertical,
......@@ -131,8 +128,8 @@ CrostiniUninstallerView::CrostiniUninstallerView(Profile* profile)
views::DialogContentType::TEXT, views::DialogContentType::TEXT));
const base::string16 device_type = ui::GetChromeOSDeviceName();
const base::string16 message = l10n_util::GetStringFUTF16(
IDS_CROSTINI_UNINSTALLER_BODY, app_name_, device_type);
const base::string16 message =
l10n_util::GetStringFUTF16(IDS_CROSTINI_UNINSTALLER_BODY, device_type);
message_label_ = new views::Label(message);
message_label_->SetMultiLine(true);
message_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
......@@ -159,8 +156,7 @@ void CrostiniUninstallerView::HandleError(const base::string16& error_message) {
void CrostiniUninstallerView::UninstallCrostiniFinished(
crostini::ConciergeClientResult result) {
if (result != crostini::ConciergeClientResult::SUCCESS) {
HandleError(
l10n_util::GetStringFUTF16(IDS_CROSTINI_UNINSTALLER_ERROR, app_name_));
HandleError(l10n_util::GetStringUTF16(IDS_CROSTINI_UNINSTALLER_ERROR));
return;
} else {
RecordUninstallResultHistogram(UninstallResult::kSuccess);
......
......@@ -63,7 +63,6 @@ class CrostiniUninstallerView : public views::DialogDelegateView {
views::ProgressBar* progress_bar_ = nullptr;
bool has_logged_result_ = false;
base::string16 app_name_;
Profile* profile_;
base::WeakPtrFactory<CrostiniUninstallerView> weak_ptr_factory_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment