Skip to content

Fix pdf export when locale is set - #363

Merged
cydanil merged 7 commits into
kirienko:masterfrom
cydanil:fix/362
Jul 12, 2021
Merged

cydanil merged 7 commits into
kirienko:masterfrom
cydanil:fix/362

Conversation

@cydanil

@cydanil cydanil commented Jul 11, 2021 •

Copy link
Copy Markdown
Collaborator

Description

Closes #362: there was an issue where the window for offering PDF export options weren't correctly set when switching from one locale to the other.
This was because of the preferences are saved with the option in a locale, but fail to load when another locale is used.

One way to fix this is to validate the values loaded from the preferences.toml file before using them, but this issue occurs not often enough to warrant such a complicated solution.
Thus, the values are now stored in english, and looked up in whatever locale is now used.

This also solve the problem, where we now have fixed locale handling, and people might now be using the application in their respective locales.

How Has This Been Tested?

This was tested by exporting one or several recipe(s) with LANGUAGES set to de_DE.utf-8, fr_FR.utf-8, and ru_RU.utf-8.
Off this, a minimal unit test was created.

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@cydanil
cydanil merged commit ca4ad62 into kirienko:master Jul 12, 2021
@cydanil
cydanil deleted the fix/362 branch July 12, 2021 15:28
cydanil added a commit to cydanil/gourmand that referenced this pull request Jul 20, 2021
* Fix pdf export when a locale is set
  kirienko/gourmet#363

* Only scale available reportlab attributes
  kirienko/gourmet#365

* Use latest Python3.8 for building AppImage
  kirienko/gourmet#367

Sorry for the squashed changes.
cydanil added a commit to cydanil/gourmand that referenced this pull request Jul 20, 2021
* Fix pdf export when a locale is set
  kirienko/gourmet#363

* Only scale available reportlab attributes
  kirienko/gourmet#365

* Use latest Python3.8 for building AppImage
  kirienko/gourmet#367

Sorry for the squashed changes.
cydanil added a commit to cydanil/gourmand that referenced this pull request Jul 20, 2021
* Fix pdf export when a locale is set
  kirienko/gourmet#363

* Only scale available reportlab attributes
  kirienko/gourmet#365

* Use latest Python3.8 for building AppImage
  kirienko/gourmet#367

Sorry for the squashed changes.
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.

PDF-Export in German not working

1 participant