Skip to content
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

"default" textdomain #19

Open
1ucay opened this issue Feb 18, 2021 · 6 comments
Open

"default" textdomain #19

1ucay opened this issue Feb 18, 2021 · 6 comments

Comments

@1ucay
Copy link

1ucay commented Feb 18, 2021

Hi, I have problem with "default" textdomain.
I have admin-cs_CZ.mo and cs_CZ.mo

In query monitor I see

default gettext +load_default_textdomain() wp-content/languages/cs_CZ.mo 324 KB
default gettext +load_default_textdomain() wp-content/languages/admin-cs_CZ.mo 507 KB

in cache folder I see two different files. Strings are correct for cs_CZ.mo and admin-cs_CZ.mo.
3233096092677fa06cba818611b302ca.mocache
<?php $_mtime = 1613318405; $_domain = 'default'; $_cache = array ( 'e943aadea30efe107c0f71e4b6ab5af0' => 'Neděle', etc..

dcc81cd674d4c7e1538f4d02514faa6f.mocache
<?php $_mtime = 1613318406; $_domain = 'default'; $_cache = array ( 'e943aadea30efe107c0f71e4b6ab5af0' => 'Neděle', etc..

But WordPress will not load admin-cs_CZ. I have English text in admin. So I just add little condition, which is not ideal.
add_filter( 'override_load_textdomain', function( $plugin_override, $domain, $mofile ) { if ( $domain === 'default' ) return false;

Any advice? Thank you.

@1ucay 1ucay changed the title czech po file "default" textdomain Feb 18, 2021
@soulseekah
Copy link
Contributor

Welcome to GitHub. Is this a vanilla WordPress installation?
Which version of PHP are you running?
Which webserver are you running?

@1ucay
Copy link
Author

1ucay commented Feb 18, 2021

Hi, thanks for your fast response :)

Yes, I tried rename plugins folder, rename theme folder, only pomodoro in mu-plugin folder, cleared cache pomodoro folder.
Same problem, some strings are in Czech, some strings are in English. Pomodoro loads only cs_CZ.mo, but not admin-cs_CZ.mo. If I disabled pomodoro, it is ok - all Czech strings. I think, there is some problem with same textdomain. Both are loaded with "default".

PHP 7.4, Apache 2.4

EDIT:
in wp-config.php Im using
define( 'WP_LANG_DIR', ABSPATH . 'wp-content/languages' );
define( 'WPLANG', 'cs_CZ');

@1ucay
Copy link
Author

1ucay commented Feb 18, 2021

Ok, I think, where is problem.
dcc81cd674d4c7e1538f4d02514faa6f.mocache
There are english + czech strings mixed together.
'bc1b299998b73ac06cf4c51f4e6c7aba' => 'Název webu',
'0815ce0b63b0ef4c9b86a0d364d1ccaf' => 'Popis webu',
'ce5b98141f00eb289ab8ce2b38cd3ac8' => 'In a few words, explain what this site is about.',
'b8825739c38ade48bbc4a7f5919e7a50' => 'Instalace WordPressu (URL)',
'4b8f716d5b90e5e648aade7479a856ef' => 'Úvodní stránka webu (URL)',
'c31ef5e68e3db1180507efb1ad56d8cc' => 'Administration Email Address',

@ncdn
Copy link

ncdn commented Apr 3, 2021

anybody here ?

@soulseekah
Copy link
Contributor

anybody here ?

Sure. What's up?

@ncdn
Copy link

ncdn commented Apr 6, 2021

anybody here ?

Sure. What's up?

I had the same problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants