Page MenuHomePhabricator

Localisation of Ctrl+B/I empty commands
Closed, InvalidPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • Go to edit a page in the Czech Wikipedia using wikieditor: https://cs.wikipedia.org/wiki/Special:EditPage/Special:Random
  • Enable syntax highlighting
  • When I select some text and press Ctrl+B/I, it's converted to bold/italic (apostrophes are added)
  • When I have an empty selection and press WEd icon, appears: '''Tučný text''' / ''Text kurzivou'' (Czech example)
  • With empty selection and pressing Ctrl+B/I, '''Bold''' / ''Italic'' appears

What should have happened instead?:
The text (Bold/Italic) should be localised respectively.

Event Timeline

It is already localizable, but someone needs to translate the messages into Czech on TranslateWiki.

It is already localizable, but someone needs to translate the messages into Czech on TranslateWiki.

They're already localized, and my Docker install shows that Ctrl+B and Ctrl+I do in fact paste the Czech localizations.

We need more context:

  1. Which wiki is this on?
  2. If this is on a non-WMF wiki, which versions of MediaWiki and WikiEditor does it run?
  3. Is your interface language Czech?

Based on the edited description and my tests, this only occurs when the syntax highlighting (i.e. CodeMirror) is enabled, so I'll redirect this task to that project.

@happy5214 I added a couple points in the description to make it clearer how to reproduce this. The issue is that when syntax highlighting is on, it for some reason uses the messages codemirror-keymap-bold/codemirror-keymap-italic (which aren't yet translated into Czech), whereas WikiEditor without syntax highlighting uses the messages wikieditor-toolbar-tool-bold-example/wikieditor-toolbar-tool-italic-example, which are translated into Czech.

@happy5214 I added a couple points in the description to make it clearer how to reproduce this. The issue is that when syntax highlighting is on, it for some reason uses the messages codemirror-keymap-bold/codemirror-keymap-italic (which aren't yet translated into Czech), whereas WikiEditor without syntax highlighting uses the messages wikieditor-toolbar-tool-bold-example/wikieditor-toolbar-tool-italic-example, which are translated into Czech.

Yeah, that's intentional. Why else would CodeMirror have the messages in the first place?

I guess the question is why CodeMirror needs to use its own messages for this – couldn't it just use WikiEditor's messages? But I guess CodeMirror is used for more than just WikiEditor, so it probably needs to use its own messages.

But I guess CodeMirror is used for more than just WikiEditor, so it probably needs to use its own messages.

Exactly.

Bhsd moved this task from Backlog to Done on the MediaWiki-extensions-CodeMirror board.

As is explained, there is nothing wrong in the code base.