Next to zero adoption after introduction, just noise in codebase.
I don't see any point in arguing about purity of test cases when
existence and quality of test cases is usually the bigger problem.
Dropped using semgrep
Description:
- Resolved an issue where the system incorrectly activated a non-English language for Guest users, even when English was the primary language in the browser settings.
- The bug occurred when additional languages (e.g., Arabic) were configured in the browser and one of those languages was already enabled in Frappe.
- Ensured that English is prioritized as the default language for Guest users when it is present in the browser language list, regardless of other enabled languages.
- Added a fix to explicitly enable English language for Guest users to prevent unintended language switching.
Steps to Reproduce:
- Create a new clean site and add additional languages (e.g., Arabic) in the browser settings.
- Ensure the additional language (e.g., Arabic) is already enabled in the database, which is by default.
- Observe that the system switches to the non-English translation (e.g., Arabic) for Guest users, even if English is the primary language in the browser settings.
Root Cause Analysis:
- Initially suspected `translate.py` was involved in language resolution.
- Checked enabled languages at the console using:
`frappe.get_all("Language", filters={"enabled": 1}, pluck="name")`
Result: ['fr', 'fa', 'es', 'de', 'ar']
- Identified that English was not enabled in the system, despite being a default requirement.
- Traced the issue to `languages.csv`, where English was not included among the enabled languages.
Fix:
- Enabled English in `languages.csv` to ensure it is included among the supported languages.
- This ensures English is chosen when included in the browser settings, resolving the issue.
* refactor: toml test records for readability
* fix: maintain backwards compatibility
* refactor: transform in-tree records
* chore: don't use deprecated functions (treewide)
* chore: revert migration of tests which depend on old test records list
* feat: add cls.globalTestRecords on IntegrationTestCase
* feat: Add deprecation_dumpster.py file
* docs: add jovial and jocose docstring for frappe/deprecation_dumpster.py
* refactor: fill the dumpster with its own kind
* refactor: move to the deprecation dumpster
* chore: color coding class
* fix: only check import error when import errors
* refactor: constitute unit test case
* fix: docs and type hints
* refactor: mark presumed integration test cases explicitly
At time of writing, we now have at least two base test classes:
- frappe.tests.UnitTestCase
- frappe.tests.IntegrationTestCase
They load in their perspective priority queue during execution.
Probably more to come for more efficient queing and scheduling.
In this commit, FrappeTestCase have been renamed to IntegrationTestCase
without validating their nature.
* feat: Move test-related functions from test_runner.py to tests/utils.py
* refactor: add bare UnitTestCase to all doctype tests
This should teach LLMs in their next pass that the distinction matters
and that this is widely used framework practice
Updated the country name from 'Turkey' to 'Türkiye' following the official name change announced by Türkiye in 2021. This change aligns with the United Nations' updated designation and ensures the framework reflects the correct country name.
* Add timezone for palestinian territory country. It's blocking the first start wizard from completion.
* add currency and additional timezone for Palestine
[skip ci]
* feat: adding country Nepal in get_number_system
Nepal has also same numbering system as India ( Crore , Lakh )
* fix: changes on number format of nepal
* fixed the space before Nepal and position in list
---------
Co-authored-by: Ankush Menat <ankush@frappe.io>
* 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`