Bug 834721 - Use plurals for toolbox button tooltip; r=paul f=l10n

This commit is contained in:
Mihai Sucan 2013-02-15 23:29:44 +02:00
Родитель 6e439d3f32
Коммит 6ec217a199
2 изменённых файлов: 24 добавлений и 13 удалений

Просмотреть файл

@ -626,17 +626,16 @@ function DT__updateErrorsCount(aChangedTabId)
let btn = this._errorCounterButton;
if (errors) {
let errorsText = toolboxStrings
.GetStringFromName("toolboxToggleButton.errorsCount");
errorsText = PluralForm.get(errors, errorsText);
.GetStringFromName("toolboxToggleButton.errors");
errorsText = PluralForm.get(errors, errorsText).replace("#1", errors);
let warningsText = toolboxStrings
.GetStringFromName("toolboxToggleButton.warningsCount");
warningsText = PluralForm.get(warnings, warningsText);
.GetStringFromName("toolboxToggleButton.warnings");
warningsText = PluralForm.get(warnings, warningsText).replace("#1", warnings);
let tooltiptext = toolboxStrings
.formatStringFromName("toolboxToggleButton.tooltiptext",
[errors, errorsText, warnings,
warningsText], 4);
.formatStringFromName("toolboxToggleButton.tooltip",
[errorsText, warningsText], 2);
btn.setAttribute("error-count", errors);
btn.setAttribute("tooltiptext", tooltiptext);

Просмотреть файл

@ -2,9 +2,21 @@ toolboxDockButtons.bottom.tooltip=Dock to bottom of browser window
toolboxDockButtons.side.tooltip=Dock to side of browser window
toolboxDockButtons.window.tooltip=Show in separate window
# LOCALIZATION NOTE (toolboxToggleButton): These strings are used for the button
# that allows users to open/close the developer tools. You can find this button
# on the developer toolbar.
toolboxToggleButton.errorsCount=error;errors
toolboxToggleButton.warningsCount=warning;warnings
toolboxToggleButton.tooltiptext=%S %S, %S %S.\nClick to toggle the developer tools.
# LOCALIZATION NOTE (toolboxToggleButton.errors): Semi-colon list of plural
# forms.
# See: http://developer.mozilla.org/en/docs/Localization_and_Plurals
# #1 number of errors in the current web page
toolboxToggleButton.errors=#1 error;#1 errors
# LOCALIZATION NOTE (toolboxToggleButton.warnings): Semi-colon list of plural
# forms.
# See: http://developer.mozilla.org/en/docs/Localization_and_Plurals
# #1 number of warnings in the current web page
toolboxToggleButton.warnings=#1 warning;#1 warnings
# LOCALIZATION NOTE (toolboxToggleButton.tooltip): This string is shown
# as tooltip in the developer toolbar to open/close the developer tools.
# It's using toolboxToggleButton.errors as first and
# toolboxToggleButton.warnings as second argument to show the number of errors
# and warnings.
toolboxToggleButton.tooltip=%1$S, %2$S\nClick to toggle the developer tools.