* chore!: remove redundant translation
* refactor!: remove "get_translated_dict" hook
Instead, include the results from
`frappe.geo.country_info.get_translated_dict` in `get_all_translations`.
* test: money_in_words uses translated currency
... and now we have translations.
* Revert "test: money_in_words uses translated currency"
This reverts commit e07d594ac1ce4b120c0fceb5d23377cb981fe820.
* refactor!: stop translating timezone and currency
* refactor: rename `get_translated_dict`
... to `get_translated_countries`
- translations are loaded in apps.txt order this doesnt make much sense.
- translations are loaded from apps which aren't even installed, again
doesn't make sense.
Breaking but necessary change.
* Refactor type checks defined in APIs
* Remove dead/deprecated kwargs usages
* Added appropriate hints to APIs and consecutive utils defined in the following modules:
- frappe.realtime
- frappe.translate
- frappe.utils.global_search
- frappe.www.third_party_apps
- frappe.www.search
- frappe.www.printview
_("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.
* refactor: rename poorly named functions
* refactor: getting translation from apps
- use generator
- use sane name for cache key
- avoid manual handling of frappe.local state just use cache() interface
* feat: Select only enabled languages for "language selector", and use System Settings lang as default one
[skip ci]
(cherry picked from commit e5b8a47835d22b7834865324d30d796bb3031dd5)
Co-authored-by: Development for People <47140294+developmentforpeople@users.noreply.github.com>
RIP my cool handwritten AST code :'(
Few things to note:
1. Publicly documented APIs, they don't support capturing kwargs.
2. We can't use documented "lower level" APIs, we need to go _even lower_.
* chore: warn about missing scheduler / doc events
* fix: pass list instead of filter
filter can only be iterated upon once
* refactor: many typehints in __init__.py