AdvancedCustomFields / AdvancedCustomFields/acf
Load textdomain doesn't load the right file
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 945
- Forks
- 197
- PR merge metrics
- No merged PRs in 30d
Description
The function acf_load_textdomain( $domain = 'acf' ) (at l10n.php file) doesn't load the right file from the WordPress languages directory.
I will use as an example the locale en-ES:
This value of $mofile = $domain . '-' . $locale . '.mo'; results in acf-es_ES.mo but the right file name is advanced-custom-fields-es_ES.mo
Then the .mo file from plugin lang folder is loaded
The result is that translations made by the community are not being used, but local versions that are obsolete.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in l10n.php at acf_load_textdomain() and inspect how the WordPress languages directory and the plugin language folder are searched. Verify that the WordPress community translation filename is selected for the locale, while the plugin fallback still works; done means the current community translation is loaded instead of an obsolete local copy.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- localization
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100