Bug 1453800 - Move the container removal dialog strings to preferences.ftl. r?flod
MozReview-Commit-ID: JAAfviRvbJb
--- a/browser/components/preferences/in-content/preferences.xul
+++ b/browser/components/preferences/in-content/preferences.xul
@@ -51,17 +51,16 @@
xmlns:html="http://www.w3.org/1999/xhtml"
disablefastfind="true"
data-l10n-id="pref-page"
data-l10n-attrs="title">
<link rel="localization" href="branding/brand.ftl"/>
<link rel="localization" href="browser/branding/sync-brand.ftl"/>
<link rel="localization" href="browser/preferences/preferences.ftl"/>
- <link rel="localization" href="browser/preferences/containers.ftl"/>
<!-- Links below are only used for search-l10n-ids into subdialogs -->
<link rel="localization" href="browser/preferences/blocklists.ftl"/>
<link rel="localization" href="browser/preferences/clearSiteData.ftl"/>
<link rel="localization" href="browser/preferences/colors.ftl"/>
<link rel="localization" href="browser/preferences/connection.ftl"/>
<link rel="localization" href="browser/preferences/fonts.ftl"/>
<link rel="localization" href="browser/preferences/languages.ftl"/>
--- a/browser/locales/en-US/browser/preferences/containers.ftl
+++ b/browser/locales/en-US/browser/preferences/containers.ftl
@@ -39,29 +39,16 @@ containers-icon-label = Icon
containers-color-label = Color
.accesskey = o
.style = { -containers-labels-style }
containers-button-done =
.label = Done
.accesskey = D
-containers-remove-alert-title = Remove This Container?
-
-# Variables:
-# $count (Number) - Number of tabs that will be closed.
-containers-remove-alert-msg =
- { $count ->
- *[one] If you remove this Container now, { $count } container tab will be closed. Are you sure you want to remove this Container?
- [other] If you remove this Container now, { $count } container tabs will be closed. Are you sure you want to remove this Container?
- }
-
-containers-remove-ok-button = Remove this Container
-containers-remove-cancel-button = Don’t remove this Container
-
containers-color-blue =
.label = Blue
containers-color-turquoise =
.label = Turquoise
containers-color-green =
.label = Green
containers-color-yellow =
.label = Yellow
--- a/browser/locales/en-US/browser/preferences/preferences.ftl
+++ b/browser/locales/en-US/browser/preferences/preferences.ftl
@@ -170,16 +170,30 @@ containers-disable-alert-desc =
containers-disable-alert-ok-button =
{ $tabCount ->
[one] Close { $tabCount } Container Tab
*[other] Close { $tabCount } Container Tabs
}
containers-disable-alert-cancel-button = Keep enabled
+containers-remove-alert-title = Remove This Container?
+
+# Variables:
+# $count (Number) - Number of tabs that will be closed.
+containers-remove-alert-msg =
+ { $count ->
+ [one] If you remove this Container now, { $count } container tab will be closed. Are you sure you want to remove this Container?
+ *[other] If you remove this Container now, { $count } container tabs will be closed. Are you sure you want to remove this Container?
+ }
+
+containers-remove-ok-button = Remove this Container
+containers-remove-cancel-button = Don’t remove this Container
+
+
## General Section - Language & Appearance
language-and-appearance-header = Language and Appearance
fonts-and-colors-header = Fonts & Colors
default-font = Default font
.accesskey = D
new file mode 100644
--- /dev/null
+++ b/python/l10n/fluent_migrations/bug_1453800_container_removal.py
@@ -0,0 +1,56 @@
+# coding=utf8
+
+# Any copyright is dedicated to the Public Domain.
+# http://creativecommons.org/publicdomain/zero/1.0/
+
+from __future__ import absolute_import
+import fluent.syntax.ast as FTL
+from fluent.migrate.helpers import EXTERNAL_ARGUMENT
+from fluent.migrate import COPY
+from fluent.migrate.transforms import PLURALS, REPLACE_IN_TEXT
+
+
+def migrate(ctx):
+ """Bug 1453800 - Migrate Container removal strings to Fluent, part {index}."""
+
+ ctx.add_transforms(
+ 'browser/browser/preferences/preferences.ftl',
+ 'browser/browser/preferences/preferences.ftl',
+ [
+ FTL.Message(
+ id=FTL.Identifier('containers-remove-alert-title'),
+ value=COPY(
+ 'browser/chrome/browser/preferences/preferences.properties',
+ 'removeContainerAlertTitle',
+ ),
+ ),
+ FTL.Message(
+ id=FTL.Identifier('containers-remove-alert-msg'),
+ value=PLURALS(
+ 'browser/chrome/browser/preferences/preferences.properties',
+ 'removeContainerMsg',
+ EXTERNAL_ARGUMENT('count'),
+ lambda text: REPLACE_IN_TEXT(
+ text,
+ {
+ '#S': EXTERNAL_ARGUMENT('count')
+ }
+ )
+ )
+ ),
+ FTL.Message(
+ id=FTL.Identifier('containers-remove-ok-button'),
+ value=COPY(
+ 'browser/chrome/browser/preferences/preferences.properties',
+ 'removeContainerOkButton',
+ ),
+ ),
+ FTL.Message(
+ id=FTL.Identifier('containers-remove-cancel-button'),
+ value=COPY(
+ 'browser/chrome/browser/preferences/preferences.properties',
+ 'removeContainerButton2',
+ ),
+ ),
+ ]
+ )