Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Tim W

    (@timwhitlock)

    Have you just updated to WordPress 6.7?

    Thread Starter zsoca

    (@zsoca)

    Yes! I tried this method, but it did not work: https://localise.biz/wordpress/plugin/custom-translations

    Plugin Author Tim W

    (@timwhitlock)

    If you have a system file AND a custom file present, then my plugin should work. Note that not all problems are with my plugin. See my note in the WooCommerce forum. They may also need to fix something. I’m not a WooCommerce developer.

    Have you tried the development version as per my advice?

    Thread Starter zsoca

    (@zsoca)

    There are system file and custom file too. Yes, I’m using your development version.

    Plugin Author Tim W

    (@timwhitlock)

    Then I suspect the issue is not with my plugin.

    You can try the debugger and see for yourself that in isolation from other problems, the loader finds the text “Showing all %1$d result”

    /wp-admin/admin.php?page=loco-debug&msgid=Showing+all+%251%24d+result&msgctxt&msgid_plural=Showing+all+%251%24d+results&n=37&domain=woocommerce&locale=hu_HU
    Thread Starter zsoca

    (@zsoca)

    Ok, thank you. I hope, the Woocommerce plugin will be update soon.

    bluantinoo

    (@bluantinoo)

    @timwhitlock I have the same issue:

    • I’ve updated plugin to dev version
    • woocommerce shows 2 translations: system and custom (the custom one says there are lots of pending strings)

    But frontend is not translated.

    Your debug gives the following result:

    Showing all %1$d results

    this is the trace log:

    Running test for domain => woocommerce
    Have locale: ja_JA
    ~ filter:pre_determine_locale: none => ja_JA
    Have plugin bundle => WooCommerce
    Unloading text domain for auto loader
    Removing JIT lock

    unload_textdomain returned false
    Query: msgid “Showing all %1$d result”
    | msgid_plural “Showing all %1$d results” (n=37)
    Calling _n( “Showing all %1$d result”,”Showing all %1$d results”,37,”woocommerce” )
    ~ filter:pre_determine_locale: none => ja_JA
    ~ filter:lang_dir_for_domain {wp_content_dir}/plugins/woocommerce/i18n/languages/
    ~ action:load_textdomain: {wp_content_dir}/plugins/woocommerce/i18n/languages/woocommerce-ja_JA.mo
    ~ filter:load_textdomain_mofile: {wp_content_dir}/plugins/woocommerce/i18n/languages/woocommerce-ja_JA.mo (exists=0)
    ~ filter:translation_file_format: php
    ~ filter:load_translation_file: {wp_content_dir}/plugins/woocommerce/i18n/languages/woocommerce-ja_JA.l10n.php (exists=0)
    ~ filter:load_translation_file: {wp_content_dir}/plugins/woocommerce/i18n/languages/woocommerce-ja_JA.mo (exists=0)
    ~ filter:gettext: [“Showing all %1$d result”,”Showing all %1$d results”,37] =>”Showing all %1$d results”
    ====>| msgstr “Showing all %1$d results”
    ! Text domain not loaded after _n() call completed
    ? get_translations_for_domain => NOOP_Translations
    ! Can’t get Plural-Forms; Using built-in rules
    Parsing header: nplurals=1; plural=0;
    Selected plural form [0]
    Translated result state => true
    Searching 5 possible locations for string versions
    0 matches in 5 locations; 0 files searched

    Hope it helps.

    Plugin Author Tim W

    (@timwhitlock)

    @bluantinoo The first thing I notice is that “ja_JA” is an incorrect language code. Whatever is setting that value may be the problem. If you want to follow up on that, please open a new topic. Thanks.

    bluantinoo

    (@bluantinoo)

    @timwhitlock please forget my last post. I did not really understand what to do.

    Now I’ve used the debugger properly to check a Woocommerce translation.

    I’ve copied the Woo translations (both .mo and .po files) in all 3 places: author, system and custom.

    I’m using the dev version of Loco.

    this is the proper debug result for the string “choose an option” from Woocomerce

    Author translations:

     plugins/woocommerce/i18n/languages/woocommerce-ja.po → 選択してください

    ?plugins/woocommerce/i18n/languages/woocommerce-ja.mo?→?選択してください

    Custom translations:

     languages/loco/plugins/woocommerce-ja.po → 選択してください

     languages/loco/plugins/woocommerce-ja.mo → 選択してください

    ?languages/loco/plugins/woocommerce-ja.l10n.php?→?選択してください

    System translations:

     languages/plugins/woocommerce-ja.po → 選択してください

     languages/plugins/woocommerce-ja.mo → 選択してください

     languages/plugins/woocommerce-ja.l10n.php → 選択してください

    Trace log

    Running test for domain => woocommerce
    Have locale: ja
    ~ filter:pre_determine_locale: none => ja
    Have plugin bundle => WooCommerce
    Unloading text domain for auto loader
    Removing JIT lock
    > unload_textdomain returned false
    Query: msgid "Choose an option"
    Calling __( "Choose an option","woocommerce" )
    ~ filter:pre_determine_locale: none => ja
    ~ filter:lang_dir_for_domain {wp_lang_dir}/plugins/
    ~ action:load_textdomain: {wp_lang_dir}/plugins/woocommerce-ja.mo
    ~ filter:load_textdomain_mofile: {wp_lang_dir}/plugins/woocommerce-ja.mo (exists=1)
    ~ filter:translation_file_format: php
    ~ action:load_textdomain: {loco_lang_dir}/plugins/woocommerce-ja.l10n.php
    ~ filter:load_textdomain_mofile: {loco_lang_dir}/plugins/woocommerce-ja.l10n.php (exists=1)
    ~ filter:translation_file_format: php
    ~ filter:load_translation_file: {loco_lang_dir}/plugins/woocommerce-ja.l10n..l10n.php (exists=0)
    ~ filter:load_translation_file: {loco_lang_dir}/plugins/woocommerce-ja.l10n.php (exists=1)
    ~ filter:load_translation_file: {wp_lang_dir}/plugins/woocommerce-ja.l10n.php (exists=1)
    ~ filter:gettext: ["Choose an option"] =>"選択してください"
    ====>| msgstr "選択してください"
    Translated result state => true
    Searching 5 possible locations for string versions
    > found in {wp_content_dir}/plugins/woocommerce/i18n/languages/woocommerce-ja.po => '選択してください'
    > found in {wp_content_dir}/plugins/woocommerce/i18n/languages/woocommerce-ja.mo => '選択してください'
    > found in {loco_lang_dir}/plugins/woocommerce-ja.po => '選択してください'
    > found in {loco_lang_dir}/plugins/woocommerce-ja.mo => '選択してください'
    > found in {loco_lang_dir}/plugins/woocommerce-ja.l10n.php => '選択してください'
    > found in {wp_lang_dir}/plugins/woocommerce-ja.po => '選択してください'
    > found in {wp_lang_dir}/plugins/woocommerce-ja.mo => '選択してください'
    > found in {wp_lang_dir}/plugins/woocommerce-ja.l10n.php => '選択してください'
    > 8 matches in 5 locations; 564 files searched

    It looks like translations are there,

    but frontend they are not shown.

    Plugin Author Tim W

    (@timwhitlock)

    @bluantinoo Please start your own topic for follow ups on your own problem. As with the OP, this doesn’t look directly related to the known bug, because you have the system file installed.

Viewing 10 replies - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.