-
Notifications
You must be signed in to change notification settings - Fork 284
Enable localization and add empty Spanish po file #278
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
base: v0.7.10
Are you sure you want to change the base?
Enable localization and add empty Spanish po file #278
Conversation
* v.0.7.7 * Enhance account list views and update icon styles. Implemented dynamic page titles and subtitles for account pages by overriding `get_context_data`. Updated template text and classes for greater consistency, including standardizing icon colors for active, locked, and default roles. * Adding TransactionModel attributes during commit_txs. * Fixed a couple of hard coded dollar "$" symbols and changed them with `{% currency_symbol %}` tag to render the correct symbol when `DJANGO_LEDGER_CURRENCY_SYMBOL` is other than default ("$"). (arrobalytics#265) * Dependency update * Update contribution guidelines in README and Contribute.md Clarified the types of pull requests that are encouraged, emphasizing those that address bug fixes, enhancements, or valuable additions. Added a note discouraging submissions focused only on cosmetic changes like linting or refactoring. * Update ManyToManyField configurations and bump version to 0.7.8 Adjusted `ManyToManyField` relationships in `BillModel`, `InvoiceModel`, and `PurchaseOrderModel` to include `through` and `through_fields` for `ItemTransactionModel`. Incremented package version to `0.7.8`. * Add support for bank account type validation and retrieval based on OFX standards - Introduced `bank_account_type` field in `BankAccountModel` with predefined choices. - Added methods to retrieve routing number, account type, and account type validation in `OFXImport` class. - Enhanced account queries with a new `.cash()` method to filter accounts with `ASSET_CA_CASH` role. - Updated indexing and unique constraints for `BankAccountModel`. * Migration Update * Refactor bank account type handling and account type mapping logic - Replaced `BankAccountModel.BANK_ACCOUNT_TYPES` with explicit OFX types. - Renamed `ACCOUNT_TYPE_ROLE_MAPPING` to `ACCOUNT_TYPE_DEFAULT_ROLE_MAPPING`. - Centralized OFX type mappings in `ACCOUNT_TYPE_OFX_MAPPING`. - Removed `bank_account_type` field from `BankAccountModel`. - Added `get_account_type_from_ofx` method for retrieving account type from OFX data. * Add financial institution field and utility methods to account models - Introduced `financial_institution` field in account mixin for storing bank details. - Added `get_account_last_digits` utility for partial account number retrieval. - Implemented `can_hide` and `can_unhide` methods in `BankAccountModel`. * Refactor account handling and enhance validation methods - Renamed `get_account_type` to `get_ofx_account_type` for clarity in OFX implementation. - Added `get_account_type` method to map OFX account types to internal account types. - Introduced `get_routing_last_digits` method for masked routing number retrieval. - Improved handling of missing account and routing numbers in utility methods. * Sort node issue fix * Update chart_of_accounts.py * Bump version to 0.7.9 and update `for_entity` method to accept `EntityModel` instances. --------- Co-authored-by: Pablo Santa Cruz <[email protected]> Co-authored-by: killinstreak <[email protected]> Co-authored-by: Shucon Tech <[email protected]>
…ly shared locales folder.
I should also edit the documentation to provide instructions to generate a new *.po file. @elarroba do you have any location preference for this info? Maybe a specific section of the main README file? |
I added a section in the main README. Please let me know if you like it or if you would prefer it somewhere else.
In future iterations, the selected language could be picked up from the user's HTTP headers. For now, the option is to hardcode it using |
2b550f5
to
77ce8a6
Compare
I want to avoid making this PR gigantic. Do you mind if we get this PR reviewed (and hopefully merged) first? I can then submit a separate PR with these changes in this branch, which are the actual Spanish translations as well as missing |
…nction so it is made available in AppCharts.ts. Include README instructions for the generation of javascript translations.
Contributes to #248
This change enables localization via the modification of
LANGUAGE_CODE
(found in settings.py, line 93). In other words, this change only enables the hardcoded type of localization, not the kind that the user would select from a dropdown in the website (that requires adding middleware, urls, and adding the dropdown somewhere in a template).I tested this change by setting
LANGUAGE_CODE
toes
and also toes-mx
, generating the corresponding *.po files for each, then making a few quick translations, compiling the *.po file into *.mo file, and verifying that the translations show up (and they do).I am including the default (not-yet translated) file for Spanish, which in a follow-up PR I will translate as much as I can.