Closed kalonya closed 1 year ago
Hi @kalonya,
Thank you for submitting the issue. However, I can’t reproduce it using the steps you provided. Everything is working as expected on my end.
I am using the Storefront theme as you do (shown on your screenshot) + WooCommerce 4.5.1:
I further checked the translations of both singular and plural of Address / Addresses
using Loco Translate as you did. Both of the translations were there:
Singular - Address:
Plural - Addresses:
As far as the issue with missing translations on your end, please check if you have any updates available for translations on your site via Dashboard / Updates / Translations
. If the update is available, there will be an indication of it and a button to update - see my screenshot below (there is no button to update because I already did but I wanted to show where it would be located):
Regarding the issue with the Addressees not appearing in the My Account page:
Can you please confirm that you tested your site for theme and plugins conflict? You indicated in your bug report that you did but I always like to confirm.
To do that, you’d need to deactivate all plugins except for WooCommerce and switch the default theme such as Storefront. Then test again.
If the issue is resolved with the default theme and all plugins deactivated, it means that one of your plugins or a theme is causing the issue. You will then need to enable it one by one and test every time you do that in order to figure out which plugin is causing the issue.
Hi @juliaamosova, thanks for checking the issue in depth. I've checked that on my local with a clean installation and the same problem also happens here. Can you confirm that there is a translated string for the "Address" string when you follow the steps below?
Hi @kalonya,
I followed your steps in the last comment and not seeing anything in the Altre
section:
That's what I said 🙂 There is a missing translation
We've also had a couple reports on this in the WordPress.org forums: https://wordpress.org/support/topic/missing-text-on-myaccount-navigation-link-edit-address/ https://wordpress.org/support/topic/addresses-does-not-show-in-navigation-my-account-menu/ (For this one, adding a translation to the Others tab fixed the issue).
After upgrading to WP 5.6.1 with Woocommerce 4.8 using en-AU we found the same issue.
Its my belief that when commit 718943c4dfb9dfe41393b358c0c6833e60813714 and 7f5dd5c9975e81ad8e45b6068675eeedb0d4a96a were made to includes/wc-account-functions.php
the logic for choosing which localisation string to use was affected. (Its line 102 at the time of writing).
It looks to me like previously the string used would have been "Address" in its single form if there was no shipping. https://translate.wordpress.org/projects/wp-plugins/woocommerce/stable/en-au/default/?filters%5Bstatus%5D=either&filters%5Boriginal_id%5D=578237&filters%5Btranslation_id%5D=23459405
and that "Addresses" would have been chosen if the function triggered. I can't be sure, but I wonder if this triggered the unfortunate backwardsness in the 'Addresses' translatable string where now the plural form Addresses is marked as singular and the singular form Address is marked as plural (and not translated). To cap it all off, there is an empty version of the string recorded - at least in our locale. https://translate.wordpress.org/projects/wp-plugins/woocommerce/stable/en-au/default/?filters%5Bstatus%5D=either&filters%5Boriginal_id%5D=2963977&filters%5Btranslation_id%5D=43560786
in po terms:
#: includes/admin/settings/class-wc-settings-advanced.php:283
#: includes/wc-account-functions.php:102 includes/class-wc-query.php:128
msgid "Addresses"
msgid_plural "Address"
msgstr[0] "Addresses"
msgstr[1] ""
Incidentally, I assume is an extraneous colon here causing a new string instead of re-use of an existing one. I mention this as a related example of similar strings being created by mistake. https://translate.wordpress.org/projects/wp-plugins/woocommerce/stable/en-au/default/?filters%5Bstatus%5D=either&filters%5Boriginal_id%5D=4283810&filters%5Btranslation_id%5D=48438392
Thanks for the additional feedback, everyone! I marked this issue as bug
and gave it a high
priority for fixing due to the number of comments we received - it seems to affect many people.
We're setting a new Woocommerce store up, and the problem is also present in Latvian. And I found the translation for all single/plural forms was incomplete. But it surely is a problem of the translations, language files, not Woocommerce, isn't it?
@JanisE : The strings to translate are extracted from the Woocommerce codebase then translated outside the repository. There seem to be several related issues causing the problem which we're seeing here (which I tried to explain in https://github.com/woocommerce/woocommerce/issues/27655#issuecomment-776678466 ) but that this issue still exists suggests to me there is no one in the WC team who is tasked with ensuring localisation/translation (strings generation, actual translation, or related issues) is in good order.
Same issue in newest hu-HU:
I found a translation error and my plan is to help to solve this issue. Problem:
"Addresses" text not translated on account page.
Caused by:
includes/wc-account-functions.php: 102. row: 'edit-address' => _n( 'Address', 'Addresses', ( 1 + (int) wc_shipping_enabled() ), 'woocommerce' ),
So address has a singular and plural text to translate (Address and Addresses), but in po/mo file these are change:
msgid "Addresses"
msgid_plural "Address"
msgstr[0] "..."
msgstr[1] "..."
To change in po / mo rows text is not acceptable:
woocommerce.po:21543: duplicate message definition...
woocommerce.po:13622: ...this is the location of the first definition
Same issue here using "English (UK)". Switching the WP language to "English (United States)" made the "Addresses" link appear in the My Account Dashboard. Reverting to "English (UK)", installing Loco Translate, and syncing the files corrected the problem. Hopefully this gets fixed soon, it has been over 2 years now...
Same issue here in Germany for the formal translation. The informal translation works. We tried everything from the above - didn't help. Please fix!
Same issue here in Germany for the formal translation. The informal translation works. We tried everything from the above - didn't help. Please fix!
I just lost my translation fix due to updating to WooCommerce 7.4.0. Following on from the testing that @kalonya did I thought I would check the details of my translation file. It was the source text "Address" that was missing the plural translation in the "English (UK)" translation file. I just added the missing translation into the blank "Plural" tab, then clicked save and now my "Addresses" link is back in the "My Account" dashboard.
So am I right in saying the fix is to simply add "Addresses" into the .po file (line 30829) and from that .po file compile the .mo file?
I'm assuming Engish (UK) here but the same is true for any language that's missing this translation.
I say that like it's a question. I've done it myself and it works. If my assumptions are correct, this seems an easy fix for the next release.
Same issue here in Germany for the formal translation. The informal translation works. We tried everything from the above - didn't help. Please fix!
I just lost my translation fix due to updating to WooCommerce 7.4.0. Following on from the testing that @kalonya did I thought I would check the details of my translation file. It was the source text "Address" that was missing the plural translation in the "English (UK)" translation file. I just added the missing translation into the blank "Plural" tab, then clicked save and now my "Addresses" link is back in the "My Account" dashboard.
Problem for me is: I cannot choose between Singular and plural at all:
So am I right in saying the fix is to simply add "Addresses" into the .po file (line 30829) and from that .po file compile the .mo file?
I'm assuming Engish (UK) here but the same is true for any language that's missing this translation.
I say that like it's a question. I've done it myself and it works. If my assumptions are correct, this seems an easy fix for the next release.
Not sure, because for me it seems to be there. But the translation is not being taken:
@zaehlpixel what you're showing in your screenshot is the same as what I have but is a different translation of "address". See mine has address twice. The red arrow on mine is the same as yours. You don't seem to have the purple arrow, which has plural and singular options (like the screenshot by neandertool). I hope that helps somewhat.
I have the same problem, I have translated using Loco plugin, but the translation wont take effect.
Same problem in Dutch language. I don't understand that this has not been fixed after 2 years. Everytime Woocommerce is updated the same problem is there.
Same problem in Spanish - Chile, my only solution until the plug in is updated was to change line 102 of the wc-account-funcions.php file to my language.
I have the same problem. Has anyone found a workaround in the meantime?
This is workaround, paste it into functions.php:
// Bug Fix Where Link Text is Empty on My Account Page
add_filter('woocommerce_account_menu_items', function($menu_links) {
$menu_links['edit-address'] = _n('Adresa', 'Adrese', (1 + (int) wc_shipping_enabled()), 'domain'); // Set your translations or just put a simple string. This example is for Croatian language.
return $menu_links;
});
Same problem in Spanish - Chile
At this time, it seems the translation (for es-cl
) needs to be updated. Specifically, the plural needs to be added (and this is probably the case for a number of languages):
So, for anyone who is still experiencing this, please do check the translation project and, if needed, submit an update for your language. Please note that:
Same problem in Dutch language. I don't understand that this has not been fixed after 2 years.
I don't see the same thing when I switch to Dutch (and, currently, it looks like the relevant strings are translated in the Dutch language pack):
Hello @barryhughes . this is for NL-be
Thanks for confirming, @BE-Zizoo. So again this is a case where the relevant translation is missing/needs to be updated:
You can submit a correction over here.
@barryhughes Thx for the feedback. I Updated the translation for NL-BE.
The same issue was reported here: 6075371-zen — The "Addresses" was missing from English (Canada) file.
Hi @namiokuzono. Yep, so essentially it is the very same issue (right now, the Canadian English translation for addresses
is missing). In any cases like these, we should encourage users to submit a correction, since translations are a community effort we don't directly manage ourselves.
This is workaround, paste it into functions.php:
// Bug Fix Where Link Text is Empty on My Account Page add_filter('woocommerce_account_menu_items', function($menu_links) { $menu_links['edit-address'] = _n('Adresa', 'Adrese', (1 + (int) wc_shipping_enabled()), 'domain'); // Set your translations or just put a simple string. This example is for Croatian language. return $menu_links; });
I have the same issue, also for WooCommerce ver. 7.6.0.
I confirm that your workaround works perfectly and fully solves the issue 👍
Eu tenho o mesmo problema, também para WooCommerce Versão 7.7.0 tradução Português do Brasil.
Confirmo que sua solução alternativa funciona perfeitamente e resolve totalmente o problema👍
// Correção de bug onde o texto do link está vazio na página Minha Conta
add_filter('woocommerce_account_menu_items', function($menu_links) {
$menu_links['edit-address'] = _n('Endereço', 'Endereços', (1 + (int) wc_shipping_enabled()), 'domain'); // Defina suas traduções ou apenas coloque uma string simples. Este exemplo é para o idioma português do Brasil.
return $menu_links;
});
Good to hear, and in the case of Brazilian Portugese it looks like a fix is waiting on approval, so hopefully will be available soon:
Eu tenho o mesmo problema, também para WooCommerce Versão 7.7.0 tradução Português do Brasil.
Confirmo que sua solução alternativa funciona perfeitamente e resolve totalmente o problema👍
// Correção de bug onde o texto do link está vazio na página Minha Conta add_filter('woocommerce_account_menu_items', function($menu_links) { $menu_links['edit-address'] = _n('Endereço', 'Endereços', (1 + (int) wc_shipping_enabled()), 'domain'); // Defina suas traduções ou apenas coloque uma string simples. Este exemplo é para o idioma português do Brasil. return $menu_links; });
Rapaz, salvou hein. O que eu quebrei de cabeça caçando uma solução pra esse problema... Funcionou mesmo. No meu caso, wp-content --> themes --> flatsome --> functions.php Adicionar o código ao final.
This is workaround, paste it into functions.php:
// Bug Fix Where Link Text is Empty on My Account Page add_filter('woocommerce_account_menu_items', function($menu_links) { $menu_links['edit-address'] = _n('Adresa', 'Adrese', (1 + (int) wc_shipping_enabled()), 'domain'); // Set your translations or just put a simple string. This example is for Croatian language. return $menu_links; });
Works like a charm. Didn't think it would still be a thing with WooCommerce 8.1.
'Addresses' tab work if I disable LocoTranslate, though... So, I'm not sure where it's still a problem?
Closing: I don't think there is any further work to be done within the codebase—the remaining problems seem to be cases where translation packs are lagging behind.
Do not use the "New language" option when adding a new language.
Just copy the language in which you installed WordPress. In my example, this language is Turkish.
When you add a new language, translations are loaded from the "Woocommerce.pot" file. I saw that this file was problematic. There are 2 "Addresses" sections in the original translation file. One of these translations is missing in the "Woocommerce.pot" file.
There is some fix for this issue? So many years after this issue was found and this insist to happen!
@freecookbr: as we understand it, the problem is solved (from a core WooCommerce perspective, at least) and the solution is to update the translation files. Some of the earlier comments in this issue, like this one, might provide additional context if you are unsure what I'm referring to.
With that in mind, if you are still seeing this problem, please do check the official translation pack and ensure it is accurate and up-to-date as a first step. If you are certain that is all in order, please create a new issue (as this issue has been closed, and may not be actively monitored in the future) and be sure to include the following information:
We still have this problem on a website which runs since many years. We update the website like every day. But still have the problem for German (formal) that we don't see the translated german text on the frontend. What's the solution? Thanks.
Hi, @kankadev: have you checked if the relevant strings are translated (as described in a few earlier comments), and can you confirm which form of German you are using?
At time of writing, for example, the Austrian German translation is incomplete and though one of the missing translations we are concerned with has been submitted (and is waiting on approval), one has not:
For anyone else coming across this report:
We do not directly control translations: the process is facilitated by translate.wordpress.org and is a community effort.
Please provide us with the information requested in this bug report. Without these details, we won't be able to fully evaluate this issue. Bug reports lacking detail, or for any other reason than to report a bug, may be closed without action.
Prerequisites (mark completed items with an [x]):
Describe the bug The "Address" menu item is missing on the My Account menu and My Account Dashboard in Italian.
Expected behavior The "Address" menu item should be displayed correctly in Italian.
Actual behavior The Addresses / Address string translations are misplaced and only one of them has been translated.
Screenshots
Isolating the problem (mark completed items with an [x]):
WordPress Environment We use the WooCommerce System Status Report to help us evaluate the issue. Without this report, we won't be able to fully evaluate this issue.