-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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: ignore global translations #18733
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ankush
added
backport version-13-hotfix
backport version-14-hotfix
backport to version 14
labels
Nov 2, 2022
_("string") outside of function/methods don't make any sense cause they are initialized the moment module is imported. This is already checked in CI yet people make this mistake. Ignore and refuse to translate in those cases.
ankush
force-pushed
the
translations_global
branch
from
November 2, 2022 21:06
b12a98e
to
37548e4
Compare
ankush
added a commit
to ankush/erpnext
that referenced
this pull request
Nov 2, 2022
This is not how it works. Translations are dynamic based on language sets during request (using header, user's preferences etc) Calling them on global variables makes no sense. Ref: frappe/frappe#18733
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## develop #18733 +/- ##
===========================================
- Coverage 63.04% 62.95% -0.10%
===========================================
Files 747 747
Lines 67256 67528 +272
Branches 5995 5995
===========================================
+ Hits 42400 42510 +110
- Misses 21374 21536 +162
Partials 3482 3482
Flags with carried forward coverage won't be shown. Click here to find out more. |
ankush
requested review from
a team and
phot0n
and removed request for
a team
November 2, 2022 21:29
mergify bot
pushed a commit
that referenced
this pull request
Nov 2, 2022
_("string") outside of function/methods don't make any sense cause they are initialized the moment module is imported. This is already checked in CI yet people make this mistake. Ignore and refuse to translate in those cases. (cherry picked from commit a1a296a)
mergify bot
pushed a commit
that referenced
this pull request
Nov 2, 2022
_("string") outside of function/methods don't make any sense cause they are initialized the moment module is imported. This is already checked in CI yet people make this mistake. Ignore and refuse to translate in those cases. (cherry picked from commit a1a296a)
ankush
added a commit
that referenced
this pull request
Nov 3, 2022
_("string") outside of function/methods don't make any sense cause they are initialized the moment module is imported. This is already checked in CI yet people make this mistake. Ignore and refuse to translate in those cases. (cherry picked from commit a1a296a) Co-authored-by: Ankush Menat <ankush@frappe.io>
mergify bot
added a commit
that referenced
this pull request
Nov 3, 2022
_("string") outside of function/methods don't make any sense cause they are initialized the moment module is imported. This is already checked in CI yet people make this mistake. Ignore and refuse to translate in those cases. (cherry picked from commit a1a296a) Co-authored-by: Ankush Menat <ankush@frappe.io> (cherry picked from commit 5f36923)
ankush
pushed a commit
that referenced
this pull request
Nov 3, 2022
_("string") outside of function/methods don't make any sense cause they are initialized the moment module is imported. This is already checked in CI yet people make this mistake. Ignore and refuse to translate in those cases. (cherry picked from commit a1a296a) Co-authored-by: Ankush Menat <ankush@frappe.io> (cherry picked from commit 5f36923) Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
frappe-pr-bot
pushed a commit
that referenced
this pull request
Nov 3, 2022
## [14.14.1](v14.14.0...v14.14.1) (2022-11-03) ### Bug Fixes * ignore global translations ([#18733](#18733)) ([392bebe](392bebe))
ankush
added a commit
to frappe/erpnext
that referenced
this pull request
Nov 5, 2022
This is not how it works. Translations are dynamic based on language sets during request (using header, user's preferences etc) Calling them on global variables makes no sense. Ref: frappe/frappe#18733
stephenBDT
pushed a commit
to alias/frappe
that referenced
this pull request
Nov 7, 2022
_("string") outside of function/methods don't make any sense cause they are initialized the moment module is imported. This is already checked in CI yet people make this mistake. Ignore and refuse to translate in those cases. (cherry picked from commit a1a296a) Co-authored-by: Ankush Menat <ankush@frappe.io> (cherry picked from commit 5f36923) Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
stephenBDT
pushed a commit
to alias/frappe
that referenced
this pull request
Nov 7, 2022
## [14.14.1](frappe/frappe@v14.14.0...v14.14.1) (2022-11-03) ### Bug Fixes * ignore global translations ([frappe#18733](frappe#18733)) ([392bebe](frappe@392bebe))
frappe-pr-bot
pushed a commit
that referenced
this pull request
Nov 8, 2022
## [14.14.3](v14.14.2...v14.14.3) (2022-11-08) ### Bug Fixes * check permission before print or download document ([#18757](#18757)) ([#18785](#18785)) ([9b5225f](9b5225f)) * child table don't run mobile specific code ([d9af38b](d9af38b)) * dont close static modal with keyboard ([3e45d80](3e45d80)) * encode docname when routing (backport [#17092](#17092)) ([#17374](#17374)) ([#18748](#18748)) ([9fbccc7](9fbccc7)) * file cropper broken in webform ([e4bb26e](e4bb26e)) * hide value only if it's equal to the label ([#18722](#18722)) ([#18723](#18723)) ([e88f950](e88f950)) * ignore global translations ([#18733](#18733)) ([#18735](#18735)) ([5f36923](5f36923)) * load `doc_before_save` in `check_if_latest` ([#18752](#18752)) ([#18753](#18753)) ([243cfa3](243cfa3)) * **meta:** ensure that `insert_after` is always considered when sorting fields ([#18682](#18682)) ([2f0de9a](2f0de9a)) * not able to click checkbox in file grid view ([8f2e428](8f2e428)) * remove redundant translation ([#18775](#18775)) ([#18780](#18780)) ([a27c42e](a27c42e)) * search.py after PR [#17828](#17828) ([#18719](#18719)) ([#18721](#18721)) ([d5f39ea](d5f39ea)) * show 0 for empty currency, float, & duration fields in list view ([6edbbd4](6edbbd4)) * standard dashboards not loading ([ee1fb87](ee1fb87)) * translations ([#18765](#18765)) ([#18782](#18782)) ([aa68138](aa68138)) * **UX:** allow clicking on row to open in new tab ([#18789](#18789)) ([#18790](#18790)) ([f7d9d43](f7d9d43)) ### Performance Improvements * load `_doc_before_save` sooner to avoid DB call in `check_if_latest` ([#18666](#18666)) ([2710d08](2710d08))
stephenBDT
pushed a commit
to alias/frappe
that referenced
this pull request
Nov 11, 2022
## [14.14.3](frappe/frappe@v14.14.2...v14.14.3) (2022-11-08) ### Bug Fixes * check permission before print or download document ([frappe#18757](frappe#18757)) ([frappe#18785](frappe#18785)) ([9b5225f](frappe@9b5225f)) * child table don't run mobile specific code ([d9af38b](frappe@d9af38b)) * dont close static modal with keyboard ([3e45d80](frappe@3e45d80)) * encode docname when routing (backport [frappe#17092](frappe#17092)) ([frappe#17374](frappe#17374)) ([frappe#18748](frappe#18748)) ([9fbccc7](frappe@9fbccc7)) * file cropper broken in webform ([e4bb26e](frappe@e4bb26e)) * hide value only if it's equal to the label ([frappe#18722](frappe#18722)) ([frappe#18723](frappe#18723)) ([e88f950](frappe@e88f950)) * ignore global translations ([frappe#18733](frappe#18733)) ([frappe#18735](frappe#18735)) ([5f36923](frappe@5f36923)) * load `doc_before_save` in `check_if_latest` ([frappe#18752](frappe#18752)) ([frappe#18753](frappe#18753)) ([243cfa3](frappe@243cfa3)) * **meta:** ensure that `insert_after` is always considered when sorting fields ([frappe#18682](frappe#18682)) ([2f0de9a](frappe@2f0de9a)) * not able to click checkbox in file grid view ([8f2e428](frappe@8f2e428)) * remove redundant translation ([frappe#18775](frappe#18775)) ([frappe#18780](frappe#18780)) ([a27c42e](frappe@a27c42e)) * search.py after PR [frappe#17828](frappe#17828) ([frappe#18719](frappe#18719)) ([frappe#18721](frappe#18721)) ([d5f39ea](frappe@d5f39ea)) * show 0 for empty currency, float, & duration fields in list view ([6edbbd4](frappe@6edbbd4)) * standard dashboards not loading ([ee1fb87](frappe@ee1fb87)) * translations ([frappe#18765](frappe#18765)) ([frappe#18782](frappe#18782)) ([aa68138](frappe@aa68138)) * **UX:** allow clicking on row to open in new tab ([frappe#18789](frappe#18789)) ([frappe#18790](frappe#18790)) ([f7d9d43](frappe@f7d9d43)) ### Performance Improvements * load `_doc_before_save` sooner to avoid DB call in `check_if_latest` ([frappe#18666](frappe#18666)) ([2710d08](frappe@2710d08))
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
_("string") outside of function/methods don't make any sense cause they
are initialized the moment module is imported. This is already checked
in CI yet people make this mistake.
Ignore and refuse to translate in those cases.
closes #18724
closes #18725