Opened 10 years ago
Last modified 9 years ago
#12486 confirmed Bug
Unreplaced token "%1" in elements path item's title
Reported by: | Piotrek Koszuliński | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | 3.0.1 |
Keywords: | Cc: |
Description
- Open languages samples.
- Change language to Arabic.
- Hover over one of the items in the elements path.
There will be "%1 sth".
I looked into the code and lang/ar.js and everything seems to be fine there, so it's worth checking what's going on.
Attachments (1)
Change History (11)
comment:1 Changed 10 years ago by
Milestone: | CKEditor 4.4.5 → CKEditor 4.4.6 |
---|
comment:2 Changed 10 years ago by
Status: | new → pending |
---|
comment:3 Changed 10 years ago by
Nothing special...
I just took latest master (but was able to reproduce it on 4.4.4 as well). Focused editor to get something in the elements path and hovered one of the items (anyone). I reproduced this on all browsers. See:
Changed 10 years ago by
Attachment: | Selection_180.png added |
---|
comment:4 Changed 10 years ago by
Status: | pending → confirmed |
---|---|
Version: | → 3.0.1 |
Problem can be reproduced from CKEditor 3.0.1.
The problem is located in file: plugins/elemntspath/lang/ar.js
There is a code eleTitle: 'عنصر 1%'
which should be eleTitle: '%عنصر 1'
so that %1 could be replaced with name of element like 'strong' or 'li' or 'p'. The second word is Element in Arabic. With that you should have 'strong element' when hovering.
comment:5 Changed 10 years ago by
This is the content of that file for me:
CKEDITOR.plugins.setLang( 'elementspath', 'ar', { eleLabel: 'مسار العنصر', eleTitle: 'عنصر 1%' } );
And WOW... In Sublime Text I can see "1%", here, after pasting I see just "1" (and "%" is at the end). So it's some RTL encoding problem ;|
comment:6 Changed 10 years ago by
Ah, I got my mistake. Elementspath plugin looks for "%1", not "1%". And someone translating this item to Arabic switched the order. Additionally, the rendering of this text in at least Chrome is incorrect, because this worked:
> CKEDITOR.instances.editor1.lang.elementspath.eleTitle.replace( /1%/, 'X' ) "عنصر X"
comment:7 Changed 10 years ago by
There are 3 places where we have incorrect patterns:
plugins/button/lang/he.js: selectedLabel: '1% (סומן)' plugins/elementspath/lang/ar.js: eleTitle: 'عنصر 1%' plugins/find/lang/ar.js: replaceSuccessMsg: 'تم استبدال 1% من الحالات ',
comment:8 Changed 10 years ago by
And two more in the core's translations:
lang/pt.js: invalidCssLength: 'O valor especificado para o campo "1%" deve ser um número positivo, com ou sem uma unidade de medida CSS válida (px, %, in, cm, mm, em, ex, pt, ou pc).', lang/pt.js: invalidHtmlLength: 'O valor especificado para o campo "1%" deve ser um número positivo, com ou sem uma unidade de medida HTML válida (px ou %).',
comment:9 Changed 10 years ago by
Milestone: | CKEditor 4.4.6 |
---|
I have tried on mac windows and every possible browser and didn't get this. Could you provide more details like: