Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: #1405 - added unbreakable spaces to welcome message #1421

Merged
merged 2 commits into from
Mar 31, 2022

Conversation

monsieurtanuki
Copy link
Contributor

Impacted files:

  • app_en.arb
  • app_fr.arb

What

  • Added unbreakable spaces to welcome message, so that "Open Food Facts" will be on the same line
  • The fix is only for English and French, and only for the welcome message
  • It may be a good idea to extend that fix to other languages and to other messages
  • In that case, perhaps we'd be better off
    • removing the unbreakable spaces from the translated strings
    • systematically replacing 'Open Food Facts' with 'Open\u00A0Food\u00A0Facts'

Fixes bug(s)

Impacted files:
* `app_en.arb`
* `app_fr.arb`
@monsieurtanuki monsieurtanuki requested a review from a team as a code owner March 31, 2022 05:54
@monsieurtanuki
Copy link
Contributor Author

@abhay1821 That's what I meant.
Additional thought: it's a bit tricky to use \u00A0 because if you copy/paste it, it becomes the character unbreakable space (at least on my mac book):

Capture d’écran 2022-03-31 à 07 58 44
... becoming ...
Capture d’écran 2022-03-31 à 07 59 11

Which is still correct, but not so simple to detect for instance when reading the code or code differences via github (where an unbreakable space looks like a space).

@abhay1821
Copy link
Contributor

abhay1821 commented Mar 31, 2022

Hi @monsieurtanuki Thank you Really appreciate your input on this. So when I tried something like this I got caught with an Exception. :(

Capture

@monsieurtanuki
Copy link
Contributor Author

@abhay1821 I guess it's just that the escape formats are different in dart and in .arb files.

@abhay1821
Copy link
Contributor

abhay1821 commented Mar 31, 2022

@monsieurtanuki So I have one more doubt, So when I tried with small width devices It looked something like this.

Small Device Width

@monsieurtanuki
Copy link
Contributor Author

@abhay1821 That's another story/issue/PR: the font size is not adapted to the screen size. Perhaps using FittedBox would do the trick. But it was not the point of the current issue: feel free to create a new issue.

@abhay1821
Copy link
Contributor

Thank you for your guidance. I would do It when this PR would get merged.

@monsieurtanuki monsieurtanuki requested a review from M123-dev March 31, 2022 06:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants