mirror of
https://github.com/ether/etherpad-lite.git
synced 2026-07-17 16:47:05 +00:00
fix(i18n): reuse translated settings title in pad dialog (#7884)
The settings modal <h1> used a dedicated `pad.settings.title` key (added in #7545) that duplicates the long-standing, already-translated `pad.toolbar.settings.title` ("Settings"). Because the duplicate was new, TranslateWiki had not translated it for most locales, so the dialog title rendered untranslated (e.g. English "Settings" on a German UI) even though the identical toolbar key is translated in 111 locales. Point the dialog title at `pad.toolbar.settings.title` and drop the duplicate `pad.settings.title` key, so the title is localised everywhere with no new strings to translate. Verified every locale carrying the old dialog-title key also has the toolbar key, so this is a strict improvement with no regression. Update the settingsModalHeading regression spec accordingly. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
02dad883cd
commit
2a29cd9aa8
3 changed files with 9 additions and 7 deletions
|
|
@ -266,7 +266,6 @@
|
|||
"pad.noCookie": "Cookie could not be found. Please allow cookies in your browser! Your session and settings will not be saved between visits. This may be due to Etherpad being included in an iFrame in some Browsers. Please ensure Etherpad is on the same subdomain/domain as the parent iFrame",
|
||||
"pad.permissionDenied": "You do not have permission to access this pad",
|
||||
|
||||
"pad.settings.title": "Settings",
|
||||
"pad.settings.padSettings": "Pad-wide Settings",
|
||||
"pad.settings.userSettings": "User Settings",
|
||||
"pad.settings.myView": "My View",
|
||||
|
|
|
|||
|
|
@ -222,7 +222,7 @@
|
|||
<!------------------------------------------------------------->
|
||||
|
||||
<div id="settings" class="popup" role="dialog" aria-modal="true" aria-labelledby="settings-title"><div class="popup-content">
|
||||
<h1 id="settings-title" data-l10n-id="pad.settings.title">Settings</h1>
|
||||
<h1 id="settings-title" data-l10n-id="pad.toolbar.settings.title">Settings</h1>
|
||||
<div class="settings-sections">
|
||||
<div id="user-settings-section" class="settings-section">
|
||||
<% e.begin_block("mySettings"); %>
|
||||
|
|
|
|||
|
|
@ -10,7 +10,10 @@ const common = require('../common');
|
|||
// `enablePadWideSettings: false` the template used to render
|
||||
// `data-l10n-id="pad.settings.padSettings"` ("Pad-wide Settings") for every
|
||||
// user, even though no pad-wide controls were rendered in that mode. The fix
|
||||
// removes the conditional and always uses `pad.settings.title` ("Settings").
|
||||
// removes the conditional and always uses the neutral "Settings" title. We
|
||||
// reuse the existing, already-translated `pad.toolbar.settings.title` key
|
||||
// rather than a dedicated `pad.settings.title` duplicate, so the title is
|
||||
// localised in every locale without waiting for new TranslateWiki strings.
|
||||
describe(__filename, function () {
|
||||
this.timeout(30000);
|
||||
let agent: any;
|
||||
|
|
@ -31,15 +34,15 @@ describe(__filename, function () {
|
|||
return m ? m[1] : null;
|
||||
};
|
||||
|
||||
it('uses pad.settings.title with the feature enabled', async function () {
|
||||
it('uses pad.toolbar.settings.title with the feature enabled', async function () {
|
||||
settings.enablePadWideSettings = true;
|
||||
const res = await agent.get('/p/headingTest').expect(200);
|
||||
assert.equal(titleH1(res.text), 'pad.settings.title');
|
||||
assert.equal(titleH1(res.text), 'pad.toolbar.settings.title');
|
||||
});
|
||||
|
||||
it('uses pad.settings.title with the feature disabled (no misleading "Pad-wide" label)', async function () {
|
||||
it('uses pad.toolbar.settings.title with the feature disabled (no misleading "Pad-wide" label)', async function () {
|
||||
settings.enablePadWideSettings = false;
|
||||
const res = await agent.get('/p/headingTest').expect(200);
|
||||
assert.equal(titleH1(res.text), 'pad.settings.title');
|
||||
assert.equal(titleH1(res.text), 'pad.toolbar.settings.title');
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue