1
0
Fork 0
mirror of https://github.com/requarks/wiki.git synced 2026-03-02 22:06:55 -05:00

"New page" modal window is not localised #2029

Closed
opened 2026-02-20 18:26:48 -05:00 by deekerman · 2 comments
Owner

Originally created by @madodig on GitHub (Sep 13, 2020).

Originally assigned to: @NGPixel on GitHub.

Describe the bug
When selecting "New Page" action, modal window that is shown is not shown in Base locale. Strings (such as "Virtual Folders", "Select New Page Location", "Pages", "Cancel", "Select" and "new-page") are hard-coded in assets/js/ui-extra.js.

To Reproduce
Steps to reproduce the behavior:

  1. Change Base Locale under Administration / Locale / Locale Settings to a language other than English and click Apply;
  2. Navigate to site content;
  3. Select "New Page" action;
  4. Modal window that is shown is not localised.

Expected behavior
Modal window that is shown after "New Page" action is selected, is shown in selected Base locale.

To fix the issue, please:

  • switch from hard-coded values in assets/js/ui-extra.js:
    from "Cancel" to "common:actions.cancel"
  • switch from hard-coding by introducing localization keys for the values, e.g.:
  "common:actions.select": "Select",
  "common:newPageModal.virtualFolders": "Virtual Folders",
  "common:newPageModal.newPageLocation": "Select New Page Location",
  "common:newPageModal.pages": "Pages",
  "common:newPageModal.newPagePath": "new-page".

Host Info:

  • OS: CentOS Linux release 8.2.2004 (Core)
  • Wiki.js version: 2.5.136
  • Database engine: PostgreSQL 12.1

Additional context
Tested with Croatian Base locale, verified in the corresponding assets JS file.
Bug is not specific to the latest version.
There are other terms that are not localised as well, but they are under Administration area hence they do not impact UX of a regular user. It would be great to have wiki completely localisable, though.

Originally created by @madodig on GitHub (Sep 13, 2020). Originally assigned to: @NGPixel on GitHub. **Describe the bug** When selecting "New Page" action, modal window that is shown is not shown in Base locale. Strings (such as "Virtual Folders", "Select New Page Location", "Pages", "Cancel", "Select" and "new-page") are hard-coded in assets/js/ui-extra.js. **To Reproduce** Steps to reproduce the behavior: 1. Change Base Locale under Administration / Locale / Locale Settings to a language other than English and click Apply; 2. Navigate to site content; 3. Select "New Page" action; 4. Modal window that is shown is not localised. **Expected behavior** Modal window that is shown after "New Page" action is selected, is shown in selected Base locale. To fix the issue, please: - switch from hard-coded values in assets/js/ui-extra.js: from "Cancel" to "common:actions.cancel" - switch from hard-coding by introducing localization keys for the values, e.g.: ``` "common:actions.select": "Select", "common:newPageModal.virtualFolders": "Virtual Folders", "common:newPageModal.newPageLocation": "Select New Page Location", "common:newPageModal.pages": "Pages", "common:newPageModal.newPagePath": "new-page". ``` **Host Info:** - OS: CentOS Linux release 8.2.2004 (Core) - Wiki.js version: 2.5.136 - Database engine: PostgreSQL 12.1 **Additional context** Tested with Croatian Base locale, verified in the corresponding assets JS file. Bug is not specific to the latest version. There are other terms that are not localised as well, but they are under Administration area hence they do not impact UX of a regular user. It would be great to have wiki completely localisable, though.
deekerman 2026-02-20 18:26:48 -05:00
Author
Owner

@NGPixel commented on GitHub (Sep 13, 2020):

Fixed by 741b99098a

@NGPixel commented on GitHub (Sep 13, 2020): Fixed by 741b99098af8afb2fc8edc74187c5a9e5ee50fad
Author
Owner

@madodig commented on GitHub (Sep 14, 2020):

Thanks @NGPixel!

@madodig commented on GitHub (Sep 14, 2020): Thanks @NGPixel!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/wiki-requarks#2029
No description provided.