-
Notifications
You must be signed in to change notification settings - Fork 2.3k
TINY-12090: Added new language code help files #10324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
WalkthroughThis update introduces new localized HTML help files for keyboard navigation in the TinyMCE editor's help plugin. The additions cover a wide range of languages, including Bulgarian, French, Hebrew, Hungarian, Korean, Norwegian, Brazilian Portuguese, European Portuguese, Slovenian, Swedish, Thai, Simplified Chinese, and Traditional Chinese. Each file provides detailed, language-specific instructions on how to use keyboard shortcuts to navigate the TinyMCE user interface, including focusing on UI sections, moving between and within UI sections, activating menu and toolbar items, and navigating dialogs with or without tabs. No existing files or code were modified. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant TinyMCE Editor
participant Help Plugin
User->>TinyMCE Editor: Opens Help dialog
TinyMCE Editor->>Help Plugin: Requests keyboard navigation help
Help Plugin->>Help Plugin: Detects user language
Help Plugin->>Help Plugin: Loads corresponding localized HTML help file
Help Plugin-->>TinyMCE Editor: Returns localized keyboard navigation instructions
TinyMCE Editor-->>User: Displays localized help content
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 13
🔭 Outside diff range comments (1)
modules/tinymce/src/plugins/help/i18n/keynav/pt-BR.html (1)
91-93
:⚠️ Potential issueFix HTML tag nesting and translate terminology
There's a stray
</strong>
and missing closing</p>
. Also update “guia” → “aba” in this context.-<p>Alterne para outra guia da caixa de diálogo colocando o foco no menu da guia e pressionando a <strong>Seta</strong> - adequada para percorrer as guias disponíveis.</strong> +<p>Alterne para outra aba da caixa de diálogo colocando o foco no menu de abas e pressionando a <strong>Seta</strong> adequada para percorrer as abas disponíveis.</p>
🧹 Nitpick comments (17)
modules/tinymce/src/plugins/help/i18n/keynav/zh-TW.html (3)
19-22
: Translation clarity for underlined state.
Consider refining the phrasing “則加底線” to “則以底線顯示” for greater clarity in Chinese.
23-39
: Consistent “的” particle in list items.
Items 5 (“頁尾中字數切換按鈕”) and 7 (“頁尾中編輯器調整大小控點”) are missing the “的” particle present in other list entries. For consistency, please update them to “頁尾中的字數切換按鈕” and “頁尾中的編輯器調整大小控點”:<ol> - <li>頁尾中字數切換按鈕</li> + <li>頁尾中的字數切換按鈕</li> - <li>頁尾中編輯器調整大小控點</li> + <li>頁尾中的編輯器調整大小控點</li> </ol>
46-68
: Refine “兩個 UI 元素之間” phrasing.
The phrase “在兩個 UI 元素之間移動” may imply exactly two elements. Consider changing it to “在 UI 元素之間移動” to more accurately mirror the source text “move between UI elements.”-<p>在兩個 UI 元素之間移動,請按適當的<strong>方向</strong>鍵。</p> +<p>在 UI 元素之間移動,請按適當的<strong>方向</strong>鍵。</p>modules/tinymce/src/plugins/help/i18n/keynav/pt-PT.html (1)
5-6
: Non-breaking Spaces for Key Combos
To prevent awkward line-breaks in narrow viewports, consider using non-breaking spaces around the “+” in key combinations (e.g.,Alt + F9
).modules/tinymce/src/plugins/help/i18n/keynav/he-IL.html (2)
1-18
: Addlang
anddir
attributes for accessibility and proper RTL rendering.Right now the file is a plain HTML fragment. To ensure screen readers and browsers render the Hebrew content correctly, wrap the content in a container (e.g.
<div>
or the root<html>
in the template) withlang="he-IL"
anddir="rtl"
. This will align with accessibility best practices for RTL languages.
5-6
: Use a plus sign with the Option key symbol for clarity.The macOS Option key is currently shown as
⌥F9
(and variants). For consistency with the Windows/Linux style (Alt+F9
), consider including a “+” after the symbol (e.g.⌥+F9
), so it reads unambiguously as “Option + F9.”Also applies to: 8-9, 11-12, 14-15, 17-18
modules/tinymce/src/plugins/help/i18n/keynav/zh-CN.html (2)
4-18
: Use<kbd>
elements for keyboard key semanticsTo improve accessibility and maintain semantic HTML (and align with web standards for representing keyboard input), replace occurrences of
<strong>
around key names and plain-text key combos with<kbd>
elements. For example:- <dd>Windows 或 Linux:Alt+F9</dd> - <dd>macOS:⌥F9</dd> + <dd>Windows 或 Linux:<kbd>Alt</kbd>+<kbd>F9</kbd></dd> + <dd>macOS:<kbd>⌥</kbd>+<kbd>F9</kbd></dd>Apply the same pattern to all instances of
<strong>
for Tab, Shift+Tab, 箭头键 (左/右/上/下), Esc, Return/Enter/空格 等.Also applies to: 24-26, 46-49, 57-63, 66-69, 72-73, 78-79, 82-85
87-87
: Ensure trailing newlinePlease add a final newline at the end of this file to adhere to POSIX and repository formatting conventions.
modules/tinymce/src/plugins/help/i18n/keynav/nb-NO.html (3)
3-18
: Ensure consistent non-breaking spaces around “+”
In the<dl>
block, most OS shortcuts use non-breaking spaces around the “+” (e.g.,Alt + F9
), but line 14 readsAlt+F12
. For visual consistency and to prevent awkward line wraps, please update it to:-<dd>Windows eller Linux: Alt+F12</dd> +<dd>Windows eller Linux: Alt + F12</dd>
50-57
: Add missing colon for left/right arrow keys section
The paragraph preceding the list of left/right arrow key actions is missing a trailing colon. Please update for clarity:-<p>De <strong>venstre</strong> og <strong>høyre</strong> piltastene</p> +<p>De <strong>venstre</strong> og <strong>høyre</strong> piltastene:</p>
59-64
: Add missing colon for up/down arrow keys section
Similarly, the up/down arrow key introduction needs a colon to match list formatting:-<p><strong>Ned</strong>- og <strong>opp</strong>-piltastene</p> +<p><strong>Ned</strong>- og <strong>opp</strong>-piltastene:</p>modules/tinymce/src/plugins/help/i18n/keynav/sl-SI.html (1)
4-92
: Enhance semantics: use<kbd>
for key references & normalize key names
Key combinations are currently wrapped in<strong>
or plain text (e.g.,Alt + F9
,shift + tabulatorko
). For better accessibility and alignment with other TinyMCE locale files, consider:
- Wrapping each key in
<kbd>
, e.g.<kbd>Alt</kbd> + <kbd>F9</kbd>
.- Consistently capitalizing modifier keys (
Shift
,Ctrl
,Alt
,Cmd
).This improves screen-reader support and ensures uniform styling across all help files.
modules/tinymce/src/plugins/help/i18n/keynav/ko-KR.html (1)
4-18
: Wrap keyboard shortcuts in<kbd>
tags for consistencyTo improve styling, accessibility, and alignment with other help files, enclose individual keys or key combinations in
<kbd>
elements. For example:- <dd>Windows 또는 Linux: Alt+F9</dd> + <dd>Windows 또는 Linux: <kbd>Alt</kbd>+<kbd>F9</kbd></dd>Apply the same pattern to macOS (e.g.,
<kbd>⌥</kbd>+<kbd>F9</kbd>
) and the remaining entries.modules/tinymce/src/plugins/help/i18n/keynav/fr-FR.html (1)
1-93
: Enhance semantic markup and accessibility
– Wrap each keyboard shortcut in a semantic<kbd>
tag (for example,<kbd>Alt+F9</kbd>
) instead of relying solely on plain text or<strong>
, which improves screen reader support.
– Revisit the heading hierarchy: multiple<h1>
elements can confuse assistive technologies. Consider keeping one main<h1>
and switching subsequent section titles to<h2>
or<h3>
.modules/tinymce/src/plugins/help/i18n/keynav/bg-BG.html (1)
1-93
: Improve semantic markup and heading structure
– Use<kbd>
elements around key sequences (e.g.,<kbd>Ctrl+F9</kbd>
) to convey keyboard inputs semantically.
– Consolidate to a single<h1>
and promote subordinate section titles to<h2>
/<h3>
to maintain a clear document outline for accessibility tools.modules/tinymce/src/plugins/help/i18n/keynav/pt-BR.html (2)
20-22
: Consolidate paragraph line breaks for readabilitySplitting the sentence across two lines can make future edits harder. Consider merging into a single
<p>
tag and normalizing capitalization of “rodapé” (lowercase or uppercase based on style guide).-<p>A navegação inicia no primeiro item da IU, que será destacado ou sublinhado no caso do primeiro item no - caminho do elemento Rodapé.</p> +<p>A navegação inicia no primeiro item da IU, que será destacado ou sublinhado no caso do primeiro item no caminho do elemento rodapé.</p>
46-66
: Refine arrow key section formatting and phrasingTo improve clarity and consistency:
- Add colons after the
<p>
headings.- Use “entre” instead of “dentre” for more natural phrasing.
-<p>As teclas de seta <strong>Esquerda</strong> e <strong>Direita</strong></p> +<p>As teclas de seta <strong>Esquerda</strong> e <strong>Direita</strong>:</p> -<p>As teclas de seta <strong>Abaixo</strong> e <strong>Acima</strong></p> +<p>As teclas de seta <strong>Abaixo</strong> e <strong>Acima</strong>:</p> -<p>As teclas de <strong>Seta</strong> alternam dentre a seção da IU em foco.</p> +<p>As teclas de <strong>Seta</strong> alternam entre as seções da IU em foco.</p>
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (13)
modules/tinymce/src/plugins/help/i18n/keynav/bg-BG.html
(1 hunks)modules/tinymce/src/plugins/help/i18n/keynav/fr-FR.html
(1 hunks)modules/tinymce/src/plugins/help/i18n/keynav/he-IL.html
(1 hunks)modules/tinymce/src/plugins/help/i18n/keynav/hu-HU.html
(1 hunks)modules/tinymce/src/plugins/help/i18n/keynav/ko-KR.html
(1 hunks)modules/tinymce/src/plugins/help/i18n/keynav/nb-NO.html
(1 hunks)modules/tinymce/src/plugins/help/i18n/keynav/pt-BR.html
(1 hunks)modules/tinymce/src/plugins/help/i18n/keynav/pt-PT.html
(1 hunks)modules/tinymce/src/plugins/help/i18n/keynav/sl-SI.html
(1 hunks)modules/tinymce/src/plugins/help/i18n/keynav/sv-SE.html
(1 hunks)modules/tinymce/src/plugins/help/i18n/keynav/th-TH.html
(1 hunks)modules/tinymce/src/plugins/help/i18n/keynav/zh-CN.html
(1 hunks)modules/tinymce/src/plugins/help/i18n/keynav/zh-TW.html
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: task-list-completed
- GitHub Check: Analyze (javascript)
- GitHub Check: task-list-completed
🔇 Additional comments (37)
modules/tinymce/src/plugins/help/i18n/keynav/zh-TW.html (5)
1-18
: Approve initial navigation mapping.
The<dl>
block correctly lists keyboard shortcuts for focusing UI sections across platforms and follows existing conventions established by other locale files.
41-45
: Approve conditional navigation notes.
The paragraphs correctly explain skipping hidden sections and the Shift+Tab behavior when the sidebar isn’t displayed.
70-77
: Approve activation instructions.
The section on using Return, Enter, and Space is clear and consistent with other locales.
78-83
: Approve non-tabbed dialog navigation.
Clear guidance on tabbing through non-tabbed dialogs; aligns well with the UX documentation.
84-92
: Approve tabbed dialog navigation.
The instructions accurately mirror the English version and use proper markup for clarity.modules/tinymce/src/plugins/help/i18n/keynav/th-TH.html (1)
1-93
: Translation and markup look accurate
The Thai help file mirrors the English structure line-for-line, all HTML tags are balanced, and entities like ⌥ are correctly used for the Option key. File naming and path follow existing conventions. No changes needed.modules/tinymce/src/plugins/help/i18n/keynav/pt-PT.html (6)
1-18
: Markup and Translation Validation
The<h1>
heading and the<dl>
definition list are semantically correct. The translations for initiating keyboard navigation—especially the platform-specific key combos and the use of⌥
for the macOS Alt symbol—align with other language files and should render properly.
20-44
: UI-Section Navigation Content
The paragraphs and the ordered list detailing “Navegar entre secções de IU” are well structured. The translation of UI section names (e.g., “Barra de menu”, “Caminho do elemento no rodapé”) is clear and consistent with Portuguese (Portugal) terminology.
46-67
: Arrow-Key Navigation Details
The<h1>
“Navegar nas secções de IU” and the following<ul>
elements correctly describe the left/right and up/down arrow behaviors. The cyclical navigation note is also accurately conveyed.
68-72
: Escape Key Behavior
The handling of theEsc
key to close menus or exit navigation is succinctly captured and the translation is precise.
73-77
: Executing Menu/Toolbar Items
The instructions under “Executar um item de menu ou botão da barra de ferramentas” are correct, and the translation of “Backspace” as “Retrocesso” plus “Enter”/“Barra de espaço” is appropriate.
78-92
: Dialog Navigation Sections
Both “Navegar em diálogos sem separadores” and “Navegar em diálogos com separadores” sections use proper HTML tags and the translations faithfully mirror the English guidance.modules/tinymce/src/plugins/help/i18n/keynav/he-IL.html (2)
20-21
: Have a native speaker verify the Hebrew phrasing.The sentence spanning lines 20–21 may read awkwardly or contain mistranslations. Please get a Hebrew-native reviewer to proofread and ensure it accurately conveys the intended meaning.
1-93
: Overall structure follows existing patterns.The file path, naming (
he-IL.html
), and markup (headings, lists, paragraphs,<dl>
for key/value pairs) are consistent with other localized keynav help files. No missing closing tags or obvious HTML errors detected.modules/tinymce/src/plugins/help/i18n/keynav/zh-CN.html (1)
1-87
: Addition of new zh-CN keyboard navigation help file is well-structured and consistentThe new Simplified Chinese localization follows the established patterns for the help plugin’s i18n fragments—using
<h1>
,<dl>
,<ol>
,<ul>
, and<p>
appropriately—and covers all the required keyboard navigation sections. The file naming (zh-CN.html
) matches the BCP-47 language code convention. No structural or content issues detected.modules/tinymce/src/plugins/help/i18n/keynav/nb-NO.html (11)
1-2
: The main heading (<h1>Starte tastaturnavigering</h1>
) is correct and follows the pattern used in other localization files.
20-22
: The introductory paragraph is clear and correctly formatted.
23-28
: The “Navigere mellom grensesnittdeler” section and its explanatory paragraphs are well written.
29-39
: The ordered list of interface parts is accurate and consistent with other language versions.
41-45
: The conditional note about skipping absent interface parts reads correctly.
46-49
: The “Navigere innenfor grensesnittdeler” heading and its introductory sentence are appropriate.
66-72
: The instructions for closing menus (Esc key behavior) are clear and correctly translated.
73-77
: The “Utføre et menyelement…” section is correctly formatted and matches other locales.
78-83
: The dialog navigation without tabs section is accurate and well structured.
84-90
: The dialog navigation with tabs section mirrors the original content and is correctly localized.
91-92
: The closing paragraph is present and correctly terminated.modules/tinymce/src/plugins/help/i18n/keynav/ko-KR.html (2)
1-93
: Well-crafted Korean localization help fileThe new help file covers all keyboard navigation scenarios clearly and mirrors the structure of other language versions. The translation is comprehensive and user-friendly.
91-93
: Verify file completeness and trailing newlineThe snippet ends abruptly around line 93 without a trailing newline or clear closure. Please confirm that this HTML fragment is complete, follows the pattern of other language files, and ends with a newline character.
modules/tinymce/src/plugins/help/i18n/keynav/hu-HU.html (1)
1-2
:✅ Verification successful
Verify header consistency across locales.
Ensure that "Billentyűzetes navigáció indítása" aligns with the English source ("Getting started with keyboard navigation") and other language files in this directory.
🏁 Script executed:
#!/bin/bash # Compare the first <h1> line in en_US and hu-HU echo "en_US:" && sed -n '1p' modules/tinymce/src/plugins/help/i18n/keynav/en_US.html echo "hu-HU:" && sed -n '1p' modules/tinymce/src/plugins/help/i18n/keynav/hu-HU.htmlLength of output: 319
🏁 Script executed:
#!/bin/bash # List all locale files in keynav and print their first <h1> line echo "Locale files and their <h1> headers in modules/tinymce/src/plugins/help/i18n/keynav:" for file in modules/tinymce/src/plugins/help/i18n/keynav/*.html; do echo "— $file" sed -n '1p' "$file" doneLength of output: 15383
Keynav locale headers are consistent
The Hungarian header<h1>Billentyűzetes navigáció indítása</h1>
correctly matches the English source (<h1>Begin keyboard navigation</h1>
) and aligns with all other locale files in this directory. No changes needed.modules/tinymce/src/plugins/help/i18n/keynav/fr-FR.html (1)
1-93
: Overall LGTM
The French localization for the keyboard navigation help is comprehensive, correctly structured, and matches the patterns used in the other language files.modules/tinymce/src/plugins/help/i18n/keynav/bg-BG.html (1)
1-93
: Overall LGTM
The Bulgarian localization content is accurate, well‐organized, and consistent with the other new keynav files.modules/tinymce/src/plugins/help/i18n/keynav/sv-SE.html (1)
1-92
: Overall: File structure and markup are consistent with existing i18n keynav help files.
- Proper use of headings (
<h1>
), definition list (<dl>
), ordered list (<ol>
), unordered list (<ul>
), and paragraphs.- Indentation and tag closures are correct.
modules/tinymce/src/plugins/help/i18n/keynav/pt-BR.html (5)
3-18
: Focus list markup and translation look correctThe
<dl>
structure for focusing UI regions is properly formed, and translations appear accurate. The use of⌥
for the Mac Option key is consistent with other locales.
23-28
: Navigation between UI sections instructions are clearThe headings and
<p>
elements for moving between sections with Tab and Shift+Tab are accurate and well-translated.
29-39
: Tab order list is accurateThe ordered list correctly reflects the Tab sequence. Ensure this matches the English version if any updates were made upstream.
40-45
: Skipping absent UI sections is described correctlyThe behavior when a section is absent is clear, and the translation flows naturally.
73-77
:❓ Verification inconclusive
Verify key name consistency for executing items
Check that the terminology for keys (Return, Enter, Barra de espaço) aligns with other locales’ naming conventions.
🏁 Script executed:
#!/bin/bash # Validate consistent key names across keynav help files fd keynav -t f -e html modules/tinymce/src/plugins/help/i18n | xargs rg -nE "Return|Enter|Barra de espaço"Length of output: 505
Verify key name consistency across all keynav help files
Ensure that the key labels
<strong>Return</strong>
,<strong>Enter</strong>
, and<strong>Barra de espaço</strong>
in pt-BR match the terminology used by other locales. You can run:#!/bin/bash # List all keynav HTML files and search for those exact key names fd -t f -e html modules/tinymce/src/plugins/help/i18n/*/keynav/*.html \ | xargs -d '\n' rg -HnE '<strong>(Return|Enter|Barra de espaço)</strong>'Review the output for each language and update any translations that deviate from the standard naming.
Related Ticket: TINY-12090
Description of Changes:
Pre-checks:
Changelog entry addedTests have been added (if applicable)feature/
,hotfix/
orspike/
Review:
GitHub issues (if applicable):
Summary by CodeRabbit