Raffael Meyer
0df57b6133
feat(translations): add hook to exclude translatable strings from dependencies ( #34544 )
2025-11-10 12:50:21 +01:00
Raffael Meyer
06e963c365
fix: extract translatable strings from the whole repo ( #27848 )
2024-09-24 15:55:46 +02:00
Corentin Forler
9a2ce010f9
fix(translate): Don't extract from gitignored files ( #27498 )
2024-09-20 12:18:28 +02:00
Raffael Meyer
6da35eca45
fix: disable fuzzy matching while updating po files ( #27257 )
2024-07-30 19:06:12 +00:00
Corentin Flr
ace4ea328b
fix(translate)!: Don't add decontextualized translations
2024-05-14 11:00:46 +02:00
barredterra
0e573fc77e
feat: move languages to CSV file, add enabled property
...
Only enable supported laguages.
2024-03-27 00:18:36 +01:00
barredterra
b23b0633e5
fix: create new pot file instead of adding to existing one
2024-01-12 01:55:14 +01:00
Ankush Menat
1e83b2e848
fix: disable line wrapping for PO files
...
This is a relic from old days where text had to be formatted <80 chars so
terminals can read them. We have massive screens now.
2024-01-11 18:51:53 +05:30
Ankush Menat
98b62e8220
fix: add _lt to extractors
2024-01-10 21:47:55 +05:30
Ankush Menat
1f83fd8847
fix: skip if file is not found
2024-01-10 20:47:58 +05:30
Ankush Menat
f246f37762
fix: language variants support
2024-01-10 18:27:57 +05:30
Ankush Menat
e893312f37
perf: parallelize MO compilation
...
This operation is CPU heavy and has little to no Frappe code
involvement. So we can use a processpool of 4 to reduce time taken for
compilation by 4x.
2024-01-10 17:21:19 +05:30
Ankush Menat
9482126b93
perf: Skip rebuilding MO files where PO file is not updated
2024-01-10 17:04:34 +05:30
Ankush Menat
5d8208ccf4
feat: Build MO files with bench build
...
Translation assets are also... assets, so grouping them with `bench build`.
We can do some special function but that will likely require updating
bench for everyone. Not so ideal.
Also renamed `compile` function as it is a builtin in python.
2024-01-10 16:41:04 +05:30
barredterra
231d1c2631
refactor: variable names
2023-12-30 03:01:55 +01:00
barredterra
5601a86587
fix: variable name conflict
2023-12-30 02:09:32 +01:00
barredterra
ef993511f0
fix: avoid writing empty .mo files
2023-12-30 01:59:55 +01:00
barredterra
45907318de
fix: handle missing locale directory
2023-12-30 01:59:18 +01:00
barredterra
7d4bdbebb9
feat: apps can provide custom message extractors
...
- custom extractors take precedence
- default extractors are used as a fallback
2023-12-27 01:44:48 +01:00
barredterra
e1140a22b8
fix: don't presume english as source language
...
Note: If we DO want this, it should happen at a higher level.
2023-12-26 23:18:07 +01:00
barredterra
483fa15c8f
fix: clear translation cache
...
- Cache was not getting cleared, since it's user-specific
- Remove unused implementation from gettext
2023-12-26 23:17:31 +01:00
barredterra
3a76fb2253
feat: support CSV and gettext at the same time
2023-12-26 19:13:10 +01:00
barredterra
a3feb08100
fix: integrate upstream changes
2023-11-06 20:40:37 +01:00
barredterra
8a0f921d78
refactor: reuse existing get_user_translations
2023-11-06 20:40:22 +01:00
barredterra
5839963475
fix: integrate upstream changes
2023-11-06 20:39:09 +01:00
barredterra
f00b510828
fix: prefer more specific extractors
2023-11-06 20:37:11 +01:00
barredterra
e16f1632a7
chore: remove unused method
2023-11-06 19:49:47 +01:00
barredterra
415834809f
feat: add extractor for Module Onboarding
2023-10-29 16:27:34 +01:00
barredterra
4a54fafa19
feat: add extractor for Onboarding Step
2023-10-29 16:19:52 +01:00
barredterra
39e12ba14c
fix: get_translations_from_apps
...
- Only consider installed apps
- Handle context correctly
2023-10-29 15:18:03 +01:00
barredterra
5c6ad3dfe2
fix: rename cache keys to avoid conflict
2023-10-29 15:09:21 +01:00
barredterra
a1e052bbb5
chore: use existing get_dict_from_hooks
2023-10-29 15:04:21 +01:00
barredterra
b280f45bff
chore: remove unused methods
...
These are much slower than the other approach (results are not cached).
Also, they are lacking a fallback mechanism for missing context.
2023-10-29 14:43:27 +01:00
barredterra
fab8ae8fd6
refactor: folder structure
...
- put .po files into [app]/locale/[lang].po
- put .mo files into sites/assets/locale/[lang]/LC_MESSAGES/[app].mo
The latter structure is mandated by the gettext library.
2023-10-29 01:25:54 +02:00
barredterra
a891feb440
feat: gettext utils
2023-10-15 20:28:13 +02:00