From c678a4a055cd1a9f33e98aa9d28cd3fe6350423d Mon Sep 17 00:00:00 2001 From: Salman Date: Sat, 10 May 2025 19:29:40 +0530 Subject: [PATCH 1/2] Update line wrap terminology in Preferences and translations --- client/modules/IDE/components/Preferences/index.jsx | 4 ++-- translations/locales/be/translations.json | 4 ++-- translations/locales/de/translations.json | 4 ++-- translations/locales/en-US/translations.json | 4 ++-- translations/locales/es-419/translations.json | 4 ++-- translations/locales/fr-CA/translations.json | 4 ++-- translations/locales/hi/translations.json | 4 ++-- translations/locales/it/translations.json | 4 ++-- translations/locales/ja/translations.json | 4 ++-- translations/locales/ko/translations.json | 4 ++-- translations/locales/pt-BR/translations.json | 4 ++-- translations/locales/sv/translations.json | 4 ++-- translations/locales/tr/translations.json | 4 ++-- translations/locales/uk-UA/translations.json | 4 ++-- translations/locales/ur/translations.json | 4 ++-- translations/locales/zh-CN/translations.json | 4 ++-- translations/locales/zh-TW/translations.json | 4 ++-- 17 files changed, 34 insertions(+), 34 deletions(-) diff --git a/client/modules/IDE/components/Preferences/index.jsx b/client/modules/IDE/components/Preferences/index.jsx index 3a21cca8d0..9e723081b0 100644 --- a/client/modules/IDE/components/Preferences/index.jsx +++ b/client/modules/IDE/components/Preferences/index.jsx @@ -386,7 +386,7 @@ export default function Preferences() { dispatch(setLinewrap(true))} - aria-label={t('Preferences.LineWrapOnARIA')} + aria-label={t('Preferences.WordWrapOnARIA')} name="linewrap" id="linewrap-on" className="preference__radio-button" @@ -399,7 +399,7 @@ export default function Preferences() { dispatch(setLinewrap(false))} - aria-label={t('Preferences.LineWrapOffARIA')} + aria-label={t('Preferences.WordWrapOffARIA')} name="linewrap" id="linewrap-off" className="preference__radio-button" diff --git a/translations/locales/be/translations.json b/translations/locales/be/translations.json index 295b075002..e987051129 100644 --- a/translations/locales/be/translations.json +++ b/translations/locales/be/translations.json @@ -168,8 +168,8 @@ "AutocompleteHinterOnARIA": "অটোকমপ্লিট হিন্টার চালু", "AutocompleteHinterOffARIA": "অটোকম", "WordWrap": "শব্দ বিন্যাস", - "LineWrapOnARIA": "লাইন বিন্যাস অন", - "LineWrapOffARIA": "লাইন বিন্যাস অফ", + "WordWrapOnARIA": "লাইন বিন্যাস অন", + "WordWrapOffARIA": "লাইন বিন্যাস অফ", "LineNumbers": "লাইন সংখ্যা", "LineNumbersOnARIA": "লাইন সংখ্যা অন", "LineNumbersOffARIA": "লাইন সংখ্যা অফ", diff --git a/translations/locales/de/translations.json b/translations/locales/de/translations.json index c9998dea0b..e97539a180 100644 --- a/translations/locales/de/translations.json +++ b/translations/locales/de/translations.json @@ -159,8 +159,8 @@ "AutocloseBracketsQuotesOnARIA": "Klammern und Anführungszeichen automatisch schließen an", "AutocloseBracketsQuotesOffARIA": "Klammern und Anführungszeichen automatisch schließen aus", "WordWrap": "Wortumbruch", - "LineWrapOnARIA": "zeilenumbruch an", - "LineWrapOffARIA": "zeilenumbruch aus", + "WordWrapOnARIA": "zeilenumbruch an", + "WordWrapOffARIA": "zeilenumbruch aus", "LineNumbers": "Zeilennummerierung", "LineNumbersOnARIA": "Zeilennummerierung an", "LineNumbersOffARIA": "Zeilennummerierung aus", diff --git a/translations/locales/en-US/translations.json b/translations/locales/en-US/translations.json index 59e6bcbaad..85359d670c 100644 --- a/translations/locales/en-US/translations.json +++ b/translations/locales/en-US/translations.json @@ -201,8 +201,8 @@ "AutocompleteHinterOnARIA": "autocomplete hinter on", "AutocompleteHinterOffARIA": "autocomplete hinter off", "WordWrap": "Word Wrap", - "LineWrapOnARIA": "linewrap on", - "LineWrapOffARIA": "linewrap off", + "WordWrapOnARIA": "wordwrap on", + "WordWrapOffARIA": "wordwrap off", "LineNumbers": "Line numbers", "LineNumbersOnARIA": "line numbers on", "LineNumbersOffARIA": "line numbers off", diff --git a/translations/locales/es-419/translations.json b/translations/locales/es-419/translations.json index 1336cf47d2..e6a944c8f4 100644 --- a/translations/locales/es-419/translations.json +++ b/translations/locales/es-419/translations.json @@ -159,8 +159,8 @@ "Off": "Desactivar", "AutosaveOffARIA": "Grabado automático desactivado", "WordWrap": "Ajuste automático de línea", - "LineWrapOnARIA": "Ajuste automático de línea activado", - "LineWrapOffARIA": "Ajuste automático de línea desactivado", + "WordWrapOnARIA": "Ajuste automático de línea activado", + "WordWrapOffARIA": "Ajuste automático de línea desactivado", "LineNumbers": "Número de línea", "LineNumbersOnARIA": "Número de línea activado", "LineNumbersOffARIA": "Número de línea desactivado", diff --git a/translations/locales/fr-CA/translations.json b/translations/locales/fr-CA/translations.json index 674a154f3f..740edde1d9 100644 --- a/translations/locales/fr-CA/translations.json +++ b/translations/locales/fr-CA/translations.json @@ -160,8 +160,8 @@ "AutocloseBracketsQuotesOnARIA": "fermeture automatique des crochets et des guillemets activée", "AutocloseBracketsQuotesOffARIA": "fermeture automatique des crochets et des guillemets désactivée", "WordWrap": "Retour à la ligne automatique", - "LineWrapOnARIA": "retour à la ligne automatique activé", - "LineWrapOffARIA": "retour à la ligne automatique désactivé", + "WordWrapOnARIA": "retour à la ligne automatique activé", + "WordWrapOffARIA": "retour à la ligne automatique désactivé", "LineNumbers": "Numéros de lignes", "LineNumbersOnARIA": "numéros de lignes activés", "LineNumbersOffARIA": "numéros de lignes désactivés", diff --git a/translations/locales/hi/translations.json b/translations/locales/hi/translations.json index 144e13738d..ba583b01f6 100644 --- a/translations/locales/hi/translations.json +++ b/translations/locales/hi/translations.json @@ -176,8 +176,8 @@ "AutocompleteHinterOnARIA": "ऑटोकम्प्लीट हिंटर चालू", "AutocompleteHinterOffARIA": "ऑटोकम्प्लीट हिंटर बंद", "WordWrap": "वर्ड रैप", - "LineWrapOnARIA": "लाइनरैप चालू", - "LineWrapOffARIA": "लाइनरैप बंद", + "WordWrapOnARIA": "वर्डरैप चालू", + "WordWrapOffARIA": "वर्डरैप बंद", "LineNumbers": "लाइन नम्बर्ज़", "LineNumbersOnARIA": "लाइन नम्बर्ज़ चालू", "LineNumbersOffARIA": "लाइन नम्बर्ज़ बंद", diff --git a/translations/locales/it/translations.json b/translations/locales/it/translations.json index b28f0f835e..58a9e104b3 100644 --- a/translations/locales/it/translations.json +++ b/translations/locales/it/translations.json @@ -161,8 +161,8 @@ "AutocloseBracketsQuotesOnARIA": "Auto-chiusura parentesi e virgolette attivo", "AutocloseBracketsQuotesOffARIA": "Auto-chiusura parentesi e virgolette disabilitata", "WordWrap": "Dividi parole", - "LineWrapOnARIA": "dividi parole attivo", - "LineWrapOffARIA": "dividi parole disabilitato", + "WordWrapOnARIA": "dividi parole attivo", + "WordWrapOffARIA": "dividi parole disabilitato", "LineNumbers": "Numero linea", "LineNumbersOnARIA": "numero linea attivo", "LineNumbersOffARIA": "numero linea disabilitato", diff --git a/translations/locales/ja/translations.json b/translations/locales/ja/translations.json index ba073a78f0..0683068fb0 100644 --- a/translations/locales/ja/translations.json +++ b/translations/locales/ja/translations.json @@ -159,8 +159,8 @@ "AutocloseBracketsQuotesOnARIA": "括弧を自動的に閉じる オン", "AutocloseBracketsQuotesOffARIA": "括弧を自動的に閉じる オフ", "WordWrap": "ワードラップ", - "LineWrapOnARIA": "ラインラップ オン", - "LineWrapOffARIA": "ラインラップ オフ", + "WordWrapOnARIA": "ラインラップ オン", + "WordWrapOffARIA": "ラインラップ オフ", "LineNumbers": "行番号", "LineNumbersOnARIA": "行番号 表示", "LineNumbersOffARIA": "行番号 非表示", diff --git a/translations/locales/ko/translations.json b/translations/locales/ko/translations.json index 33f04e94df..28f5ca6a2e 100644 --- a/translations/locales/ko/translations.json +++ b/translations/locales/ko/translations.json @@ -145,8 +145,8 @@ "AutocloseBracketsQuotesOnARIA": "괄호 및 따옴표 자동 닫기 켜기", "AutocloseBracketsQuotesOffARIA": "괄호 및 따옴표 자동 닫기 끄기", "WordWrap": "단어 자동 줄 바꿈", - "LineWrapOnARIA": "줄 바꿈 켜기", - "LineWrapOffARIA": "줄 바꿈 끄기", + "WordWrapOnARIA": "줄 바꿈 켜기", + "WordWrapOffARIA": "줄 바꿈 끄기", "LineNumbers": "줄 번호", "LineNumbersOnARIA": "줄 번호 켜기", "LineNumbersOffARIA": "줄 번호 끄기", diff --git a/translations/locales/pt-BR/translations.json b/translations/locales/pt-BR/translations.json index a051c9cf3a..583d953041 100644 --- a/translations/locales/pt-BR/translations.json +++ b/translations/locales/pt-BR/translations.json @@ -159,8 +159,8 @@ "AutocloseBracketsQuotesOnARIA": "fechar automaticamente chaves e aspas ativado", "AutocloseBracketsQuotesOffARIA": "fechar automaticamente chaves e aspas desativado", "WordWrap": "Ajuste Automático de Linhas", - "LineWrapOnARIA": "ajuste automático de linhas ativado", - "LineWrapOffARIA": "ajuste automático de linhas desativado", + "WordWrapOnARIA": "ajuste automático de linhas ativado", + "WordWrapOffARIA": "ajuste automático de linhas desativado", "LineNumbers": "Número de linhas", "LineNumbersOnARIA": "número de linhas ativado", "LineNumbersOffARIA": "número de linhas desativado", diff --git a/translations/locales/sv/translations.json b/translations/locales/sv/translations.json index 8fa743507a..f02f2ac4be 100644 --- a/translations/locales/sv/translations.json +++ b/translations/locales/sv/translations.json @@ -159,8 +159,8 @@ "AutocloseBracketsQuotesOnARIA": "automatisk stängnging av parenteser och citattecken på", "AutocloseBracketsQuotesOffARIA": "automatisk stängnging av parenteser och citattecken av", "WordWrap": "Radbrytning", - "LineWrapOnARIA": "radbrytning på", - "LineWrapOffARIA": "radbrytning av", + "WordWrapOnARIA": "radbrytning på", + "WordWrapOffARIA": "radbrytning av", "LineNumbers": "Radnummer", "LineNumbersOnARIA": "radnummer på", "LineNumbersOffARIA": "radnummer av", diff --git a/translations/locales/tr/translations.json b/translations/locales/tr/translations.json index 31538fa8fa..c90ab6bbc1 100644 --- a/translations/locales/tr/translations.json +++ b/translations/locales/tr/translations.json @@ -161,8 +161,8 @@ "AutocloseBracketsQuotesOnARIA": "parantez ve tırnakları otomatik kapatma açık", "AutocloseBracketsQuotesOffARIA": "parantez ve tırnakları otomatik kapatma kapalı", "WordWrap": "Sözcük Kaydırma", - "LineWrapOnARIA": "satır kaydırma açık", - "LineWrapOffARIA": "satır kaydırma kapalı", + "WordWrapOnARIA": "satır kaydırma açık", + "WordWrapOffARIA": "satır kaydırma kapalı", "LineNumbers": "Satır Numaraları", "LineNumbersOnARIA": "satır numaraları açık", "LineNumbersOffARIA": "satır numaraları kapalı", diff --git a/translations/locales/uk-UA/translations.json b/translations/locales/uk-UA/translations.json index 8c79ff28e6..f3d6e9fb1a 100644 --- a/translations/locales/uk-UA/translations.json +++ b/translations/locales/uk-UA/translations.json @@ -159,8 +159,8 @@ "AutocloseBracketsQuotesOnARIA": "автоматично закривати дужки та лапки", "AutocloseBracketsQuotesOffARIA": "автоматично закривати дужки та лапки", "WordWrap": "Перенесення слів", - "LineWrapOnARIA": "перенесення рядків увімкнено", - "LineWrapOffARIA": "перенесення рядків вимкнено", + "WordWrapOnARIA": "перенесення рядків увімкнено", + "WordWrapOffARIA": "перенесення рядків вимкнено", "LineNumbers": "Номери рядків", "LineNumbersOnARIA": "номери рядків вимкнено", "LineNumbersOffARIA": "номери рядків вимкнено", diff --git a/translations/locales/ur/translations.json b/translations/locales/ur/translations.json index 87cdd17e59..1f005e3a42 100644 --- a/translations/locales/ur/translations.json +++ b/translations/locales/ur/translations.json @@ -159,8 +159,8 @@ "AutocompleteHinterOnARIA": "خودکار تکمیل اشارہ آن", "AutocompleteHinterOffARIA": "خود کار طریقے سے اشارہ بند", "WordWrap": "لفظ لفاف", - "LineWrapOnARIA": "لائن لپیٹنا", - "LineWrapOffARIA": "لائن لپیٹنا", + "WordWrapOnARIA": "لائن لپیٹنا", + "WordWrapOffARIA": "لائن لپیٹنا", "LineNumbers": "لائن نمبرز", "LineNumbersOnARIA": "لائن نمبر آن", "LineNumbersOffARIA": "لائن نمبر بند", diff --git a/translations/locales/zh-CN/translations.json b/translations/locales/zh-CN/translations.json index 1e3ef7e4c4..f7dca3aff3 100644 --- a/translations/locales/zh-CN/translations.json +++ b/translations/locales/zh-CN/translations.json @@ -162,8 +162,8 @@ "AutocompleteHinterOnARIA": "打开补全提示", "AutocompleteHinterOffARIA": "关闭补全提示", "WordWrap": "自动提行", - "LineWrapOnARIA": "打开自动提行", - "LineWrapOffARIA": "关闭自动提行", + "WordWrapOnARIA": "打开自动提行", + "WordWrapOffARIA": "关闭自动提行", "LineNumbers": "行号", "LineNumbersOnARIA": "打开行号", "LineNumbersOffARIA": "关闭行号", diff --git a/translations/locales/zh-TW/translations.json b/translations/locales/zh-TW/translations.json index 94e9570019..33d8d57570 100644 --- a/translations/locales/zh-TW/translations.json +++ b/translations/locales/zh-TW/translations.json @@ -162,8 +162,8 @@ "AutocompleteHinterOnARIA": "加上補全提示", "AutocompleteHinterOffARIA": "不加上補全提示", "WordWrap": "折行", - "LineWrapOnARIA": "啟用自動折行", - "LineWrapOffARIA": "停用自動折行", + "WordWrapOnARIA": "啟用自動折行", + "WordWrapOffARIA": "停用自動折行", "LineNumbers": "行號", "LineNumbersOnARIA": "顯示行號", "LineNumbersOffARIA": "不顯示行號", From de9fb49fa85125bce9388131f4bd4b52370686a6 Mon Sep 17 00:00:00 2001 From: Salman Date: Sat, 10 May 2025 20:47:06 +0530 Subject: [PATCH 2/2] Rename linewrap to wordwrap in Preferences component and update related tests --- .../Preferences/Preferences.unit.test.jsx | 48 +++++++++---------- .../IDE/components/Preferences/index.jsx | 18 +++---- 2 files changed, 32 insertions(+), 34 deletions(-) diff --git a/client/modules/IDE/components/Preferences/Preferences.unit.test.jsx b/client/modules/IDE/components/Preferences/Preferences.unit.test.jsx index 55f9827d23..31ae714593 100644 --- a/client/modules/IDE/components/Preferences/Preferences.unit.test.jsx +++ b/client/modules/IDE/components/Preferences/Preferences.unit.test.jsx @@ -442,45 +442,43 @@ describe('', () => { ); }); }); + describe('start wordwrap at false', () => { + it('wordwrap toggle, starting at false', () => { + // render the component with wordwrap prop set to false + subject({ wordwrap: false }); - describe('start linewrap at false', () => { - it('linewrap toggle, starting at false', () => { - // render the component with linewrap prop set to false - subject({ linewrap: false }); - - // get ahold of the radio buttons for toggling linewrap - const linewrapRadioFalse = screen.getByRole('radio', { - name: /linewrap off/i + // get ahold of the radio buttons for toggling wordwrap + const wordwrapRadioFalse = screen.getByRole('radio', { + name: /wordwrap off/i }); - const linewrapRadioTrue = screen.getByRole('radio', { - name: /linewrap on/i + const wordwrapRadioTrue = screen.getByRole('radio', { + name: /wordwrap on/i }); testToggle( - linewrapRadioFalse, - linewrapRadioTrue, + wordwrapRadioFalse, + wordwrapRadioTrue, props.setLinewrap, true ); }); }); + describe('start wordwrap at true', () => { + it('wordwrap toggle, starting at true', () => { + // render the component with wordwrap prop set to true + subject({ wordwrap: true }); - describe('start linewrap at true', () => { - it('linewrap toggle, starting at true', () => { - // render the component with linewrap prop set to false - subject({ linewrap: true }); - - // get ahold of the radio buttons for toggling linewrap - const linewrapRadioFalse = screen.getByRole('radio', { - name: /linewrap off/i + // get ahold of the radio buttons for toggling wordwrap + const wordwrapRadioFalse = screen.getByRole('radio', { + name: /wordwrap off/i }); - const linewrapRadioTrue = screen.getByRole('radio', { - name: /linewrap on/i + const wordwrapRadioTrue = screen.getByRole('radio', { + name: /wordwrap on/i }); testToggle( - linewrapRadioTrue, - linewrapRadioFalse, + wordwrapRadioTrue, + wordwrapRadioFalse, props.setLinewrap, false ); @@ -513,7 +511,7 @@ describe('', () => { }); const generalElement1 = screen.getByRole('radio', { - name: /linewrap on/i + name: /wordwrap on/i }); expect(generalElement1).toBeInTheDocument(); }); diff --git a/client/modules/IDE/components/Preferences/index.jsx b/client/modules/IDE/components/Preferences/index.jsx index 9e723081b0..2b8b8e19fd 100644 --- a/client/modules/IDE/components/Preferences/index.jsx +++ b/client/modules/IDE/components/Preferences/index.jsx @@ -38,7 +38,7 @@ export default function Preferences() { tabIndex, fontSize, autosave, - linewrap, + wordwrap, lineNumbers, lintWarning, textOutput, @@ -387,26 +387,26 @@ export default function Preferences() { type="radio" onChange={() => dispatch(setLinewrap(true))} aria-label={t('Preferences.WordWrapOnARIA')} - name="linewrap" - id="linewrap-on" + name="wordwrap" + id="wordwrap-on" className="preference__radio-button" value="On" - checked={linewrap} + checked={wordwrap} /> -