Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#3434 closed defect (rejected)

[adblockplus.org] Some strings do not have the required non-breaking spaces

Reported by: Shikitita Assignee:
Priority: Unknown Milestone:
Module: Websites Keywords:
Cc: saroyanm, kzar Blocked By:
Blocking: Platform: Unknown / Cross platform
Ready: no Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

Description (last modified by kzar)

Environment

Platform: PC/iPhone 5s
Operating System: Windows/Linux/iOS 8.4
Browser: Chrome/Firefox/Safari

How to reproduce

  1. Access the following address: https://adblockplus.org/fr/acceptable-ads (make sure to visit it full screen for both Chrome and Firefox)
  2. Scroll down through the page and its different sections

Observed behaviour

In both Chrome and Firefox, the title:

"Toutes les Publicités Acceptables seront-elles affichées ?"

is displayed as follows:

"Toutes les Publicités Acceptables seront-elles affichées
?"

In Safari, the text:

"Les publicités suivantes sont considérées comme étant inAcceptables*, et ne peuvent pas faire partie de la liste blanche :"

is displayed as follows:

"Les publicités suivantes sont considérées comme étant inAcceptables*, et ne peuvent pas faire partie de la liste blanche
:"

Please note that these are just examples, but it happens more than once with different parts of the text.

Expected behaviour

Individual characters shouldn't be displayed separated from the word/number they accompany whenever a non-manual line brake takes place.

(Please note that in French, a space is always added before "?, !, :, ;, %, « (in its case after), »". For this reason, it'd make sense to use "&nbsp", if possible, in order to avoid these mistakes.)

What to change

Replace standard spaces in these situations with the Non-breaking space character. (Note: Insert the unicode character   directly into the locale files instead of the HTML entity  . The conversion to   will then be made automatically by the CMS.)

Change History (7)

comment:1 Changed 4 years ago by Shikitita

  • Cc Shikitita removed
  • Summary changed from Possibility of adding "&nbsp" tags to Crowdin translations to [adblockplus.org] Strings with non-breaking spaces in between break into next line

comment:2 follow-ups: Changed 4 years ago by kzar

  • Component changed from Sitescripts to Websites
  • Description modified (diff)
  • Summary changed from [adblockplus.org] Strings with non-breaking spaces in between break into next line to [adblockplus.org] Some strings do not have the required non-breaking spaces

I think this is an issue for the websites module as you're already free to use the Non-breaking space character where you like.

However if it's a pain to manually insert these characters perhaps we could add some special logic to the CMS in the future? Something like "If there is a space character before a punctuation character in the string and it's in one of these X languages then display a non-breaking space instead." (@Shikitita is this only an issue for French or does it apply to a few languages?)

comment:3 Changed 4 years ago by kzar

  • Cc kzar added

comment:4 in reply to: ↑ 2 ; follow-up: Changed 4 years ago by Shikitita

Replying to kzar:

(@Shikitita is this only an issue for French or does it apply to a few languages?)

Despite being French the most affected language, this issue would apply also to any language that requires a space for whatever reason. In Spanish and German, for example, there should always be a space between the number and the % symbol, or in numbers longer than 4 digits for Spanish, in which case they'd be displayed like this "34 682".

However if it's a pain to manually insert these characters perhaps we could add some special logic to the CMS in the future?

It really is not a pain if entering this character is as simple as adding " " in the translation. Manvel and I just weren't sure if we were able to add "&nbsp" to the translations or not, which is why I wrote this ticket. Now it's only a matter of testing this and hoping for Crowdin not to strip it.

comment:5 in reply to: ↑ 2 Changed 4 years ago by saroyanm

  • Resolution set to rejected
  • Status changed from new to closed

Replying to kzar:

I think this is an issue for the websites module as you're already free to use the Non-breaking space character where you like.

However if it's a pain to manually insert these characters perhaps we could add some special logic to the CMS in the future? Something like "If there is a space character before a punctuation character in the string and it's in one of these X languages then display a non-breaking space instead." (@Shikitita is this only an issue for French or does it apply to a few languages?)

You are right, I think I've tried to copy past from the browser the character, that why I didn't succeed, just tested, works fine, also work great with Crowdin, it's not being escaped if you are using non-breaking character.
Thanks for that Dave, Individual characters shouldn't be displayed separated from the word/number they accompany whenever a non-manual line brake takes place this line is about specific languages.

comment:6 in reply to: ↑ 4 ; follow-up: Changed 4 years ago by saroyanm

Replying to Shikitita:

Replying to kzar:

However if it's a pain to manually insert these characters perhaps we could add some special logic to the CMS in the future?

It really is not a pain if entering this character is as simple as adding " " in the translation. Manvel and I just weren't sure if we were able to add "&nbsp" to the translations or not, which is why I wrote this ticket. Now it's only a matter of testing this and hoping for Crowdin not to strip it.

Yes it should be possible, but do not repeat my mistake and copy that character from Browser, otherwise should be fine I guess.

comment:7 in reply to: ↑ 6 Changed 4 years ago by Shikitita

Replying to saroyanm:

Yes it should be possible, but do not repeat my mistake and copy that character from Browser, otherwise should be fine I guess.

Cool! Then I will give it a go after the holidays with the current translations of AA on the website. Thanks guys! :)

Note: See TracTickets for help on using tickets.