woocommerce / woocommerce

A customizable, open-source ecommerce platform built on WordPress. Build any commerce solution you can imagine.
https://woocommerce.com
9.39k stars 10.76k forks source link

Addresses / Address string translation problem in some languages #27655

Closed kalonya closed 1 year ago

kalonya commented 4 years ago

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

Screen Shot 2020-09-11 at 12 18 24 Screen Shot 2020-09-11 at 12 33 42 Screen Shot 2020-09-11 at 12 33 49

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.

``` ### WordPress Environment ### WordPress address (URL): https://www.oasiverdegrasso.com/wp Site address (URL): https://www.oasiverdegrasso.com/wp WC Version: 4.5.1 REST API Version: ✔ 4.5.1 WC Blocks Version: ✔ 3.1.0 Action Scheduler Version: ✔ 3.1.6 WC Admin Version: ✔ 1.5.0 Log Directory Writable: ✔ WP Version: 5.5.1 WP Multisite: – WP Memory Limit: 512 MB WP Debug Mode: – WP Cron: ✔ Language: it_IT External object cache: – ### Server Environment ### Server Info: Apache PHP Version: 7.4.10 PHP Post Max Size: 25 MB PHP Time Limit: 300 PHP Max Input Vars: 5000 cURL Version: 7.72.0 OpenSSL/1.0.2k-fips SUHOSIN Installed: – MySQL Version: 5.7.29-32-log Max Upload Size: 25 MB Default Timezone is UTC: ✔ fsockopen/cURL: ✔ SoapClient: ✔ DOMDocument: ✔ GZip: ✔ Multibyte String: ✔ Remote Post: ✔ Remote Get: ✔ ### Database ### WC Database Version: 4.5.1 WC Database Prefix: wppa_ Total Database Size: 5.27MB Database Data Size: 3.75MB Database Index Size: 1.52MB wppa_woocommerce_sessions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wppa_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wppa_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wppa_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wppa_woocommerce_order_items: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wppa_woocommerce_order_itemmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wppa_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wppa_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wppa_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wppa_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wppa_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wppa_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wppa_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wppa_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wppa_actionscheduler_actions: Data: 0.11MB + Index: 0.11MB + Engine InnoDB wppa_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wppa_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wppa_actionscheduler_logs: Data: 0.09MB + Index: 0.06MB + Engine InnoDB wppa_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wppa_comments: Data: 0.02MB + Index: 0.09MB + Engine InnoDB wppa_create_map: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wppa_group_map: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wppa_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wppa_loginizer_logs: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wppa_map_locations: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wppa_ms_snippets: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wppa_options: Data: 2.08MB + Index: 0.06MB + Engine InnoDB wppa_pmxi_files: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wppa_pmxi_history: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wppa_pmxi_images: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wppa_pmxi_imports: Data: 0.20MB + Index: 0.00MB + Engine InnoDB wppa_pmxi_posts: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wppa_pmxi_templates: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wppa_postmeta: Data: 0.09MB + Index: 0.03MB + Engine InnoDB wppa_posts: Data: 0.20MB + Index: 0.06MB + Engine InnoDB wppa_snippets: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wppa_social_users: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wppa_termmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wppa_terms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wppa_term_relationships: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wppa_term_taxonomy: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wppa_usermeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wppa_users: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wppa_wc_admin_notes: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wppa_wc_admin_note_actions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wppa_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wppa_wc_customer_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wppa_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wppa_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wppa_wc_order_product_lookup: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wppa_wc_order_stats: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wppa_wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wppa_wc_product_meta_lookup: Data: 0.02MB + Index: 0.09MB + Engine InnoDB wppa_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wppa_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wppa_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wppa_wpfm_backup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wppa_yith_wcwl: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wppa_yith_wcwl_lists: Data: 0.02MB + Index: 0.03MB + Engine InnoDB ### Post Type Counts ### attachment: 12 blocks: 2 customize_changeset: 83 nav_menu_item: 8 o-discount: 3 o-list: 1 page: 13 post: 3 product: 7 revision: 57 shop_order: 2 wpcf7_contact_form: 1 ### Security ### Secure connection (HTTPS): ✔ Hide errors from visitors: ✔ ### Active Plugins (18) ### New User Approve: by NewUserApprove – 1.8.1 Code Snippets: by Code Snippets Pro – 2.14.0 Contact Form 7: by Takayuki Miyoshi – 5.2.2 Duplicate Page: by mndpsingh287 – 4.3 Email Customizer for WooCommerce: by ThemeHigh – 1.0.5 – Installed version not tested with active version of WooCommerce 4.5.1 Loco Translate: by Tim Whitlock – 2.4.3 Loginizer: by Softaculous – 1.5.7 Mobile Contact Bar: by Anna Bansaghi – 2.0.3 Nextend Social Login: by Nextendweb – 3.0.25 Really Simple SSL: by Really Simple Plugins – 3.3.5 User Role Editor: by Vladimir Garagulya – 4.56.1 Conditional Discounts for WooCommerce by ORION: by ORION – 2.15 – Installed version not tested with active version of WooCommerce 4.5.1 WooCommerce Min Max Quantity & Step Control Single: by Saiful Islam – 1.6 – Installed version not tested with active version of WooCommerce 4.5.1 WooCommerce Services: by Automattic – 1.24.2 – Installed version not tested with active version of WooCommerce 4.5.1 WP All Import - WooCommerce Add-On: by Soflyy – 1.4.6 – Installed version not tested with active version of WooCommerce 4.5.1 WooCommerce: by Automattic – 4.5.1 WP All Import: by Soflyy – 3.5.4 YITH WooCommerce Wishlist: by YITH – 3.0.13 – Installed version not tested with active version of WooCommerce 4.5.1 ### Inactive Plugins (0) ### ### Settings ### API Enabled: – Force SSL: – Currency: EUR (€) Currency Position: left Thousand Separator: . Decimal Separator: , Number of Decimals: 2 Taxonomies: Product Types: external (external) grouped (grouped) simple (simple) variable (variable) Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog) exclude-from-search (exclude-from-search) featured (featured) outofstock (outofstock) rated-1 (rated-1) rated-2 (rated-2) rated-3 (rated-3) rated-4 (rated-4) rated-5 (rated-5) Connected to WooCommerce.com: – ### WC Pages ### Shop base: #6 - /negozio/ Cart: #7 - /carrello/ Checkout: #8 - /checkout/ My account: #9 - /mio-account/ Terms and conditions: ❌ Page not set ### Theme ### Name: Flatsome Version: 3.12.2 Author URL: http://www.uxthemes.com/ Child Theme: ❌ – If you are modifying WooCommerce on a parent theme that you did not build personally we recommend using a child theme. See: How to create a child theme WooCommerce Support: ✔ ### Templates ### Overrides: flatsome/woocommerce/archive-product.php flatsome/woocommerce/cart/cart-empty.php flatsome/woocommerce/cart/cart-shipping.php flatsome/woocommerce/cart/cart.php flatsome/woocommerce/checkout/form-checkout.php flatsome/woocommerce/checkout/form-coupon.php flatsome/woocommerce/checkout/terms.php flatsome/woocommerce/checkout/thankyou.php flatsome/woocommerce/content-product.php flatsome/woocommerce/content-product_cat.php flatsome/woocommerce/content-single-product.php flatsome/woocommerce/content-widget-product.php flatsome/woocommerce/global/breadcrumb.php flatsome/woocommerce/global/quantity-input.php flatsome/woocommerce/global/wrapper-end.php flatsome/woocommerce/global/wrapper-start.php flatsome/woocommerce/loop/loop-end.php flatsome/woocommerce/loop/loop-start.php flatsome/woocommerce/loop/pagination.php flatsome/woocommerce/loop/result-count.php flatsome/woocommerce/loop/sale-flash.php flatsome/woocommerce/myaccount/form-login.php flatsome/woocommerce/myaccount/navigation.php flatsome/woocommerce/notices/error.php flatsome/woocommerce/notices/notice.php flatsome/woocommerce/notices/success.php flatsome/woocommerce/product-searchform.php flatsome/woocommerce/single-product/photoswipe.php flatsome/woocommerce/single-product/price.php flatsome/woocommerce/single-product/product-image.php flatsome/woocommerce/single-product/product-thumbnails.php flatsome/woocommerce/single-product/rating.php flatsome/woocommerce/single-product/related.php flatsome/woocommerce/single-product/review.php flatsome/woocommerce/single-product/sale-flash.php flatsome/woocommerce/single-product/share.php flatsome/woocommerce/single-product/short-description.php flatsome/woocommerce/single-product/tabs/tabs.php flatsome/woocommerce/single-product/title.php flatsome/woocommerce/single-product/up-sells.php flatsome/woocommerce/single-product-reviews.php flatsome/woocommerce/single-product.php ### Action Scheduler ### Canceled: 1 Oldest: 2020-08-29 13:34:45 +0000 Newest: 2020-08-29 13:34:45 +0000 Complete: 296 Oldest: 2020-08-26 12:15:23 +0000 Newest: 2020-09-11 10:15:12 +0000 ```
juliaamosova commented 4 years 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:

italian1

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:

singular

Plural - Addresses:

plural


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):

italian3


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.

kalonya commented 4 years ago

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?

  1. Open the Italian language in Loco Translate
  2. Click on the Sync button and Save it
  3. Search for the "Addresses"
  4. Click on the "Other" (or Altre) and check if there is anything translated
Screen Shot 2020-09-11 at 21 27 55
juliaamosova commented 4 years ago

Hi @kalonya,

I followed your steps in the last comment and not seeing anything in the Altre section:

translations

kalonya commented 4 years ago

That's what I said 🙂 There is a missing translation

GeoJunkie commented 3 years ago

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).

goetzk commented 3 years ago

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

juliaamosova commented 3 years ago

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.

JanisE commented 3 years ago

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?

goetzk commented 3 years ago

@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.

harkalygergo commented 1 year ago

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
neandertool commented 1 year ago

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...

zaehlpixel commented 1 year ago

Same issue here in Germany for the formal translation. The informal translation works. We tried everything from the above - didn't help. Please fix!

neandertool commented 1 year ago

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.

english-uk-missing-translation

benrich commented 1 year ago

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.

zaehlpixel commented 1 year ago

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.

english-uk-missing-translation

Problem for me is: I cannot choose between Singular and plural at all:

Datei_woocommerce-de_DE_formal_po_im_Paket_WooCommerce_bearbeiten_‹_Plugin-Übersetzung_‹_Loco_‹_Maranatha-Mission_—_WordPress
zaehlpixel commented 1 year ago

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:

Datei_woocommerce-de_DE_formal_po_im_Paket_WooCommerce_bearbeiten_‹_Plugin-Übersetzung_‹_Loco_‹_Maranatha-Mission_—_WordPress
benrich commented 1 year ago

@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.

SCR-20230215-jyo-2
4n0n1mo commented 1 year ago

I have the same problem, I have translated using Loco plugin, but the translation wont take effect.

BE-Zizoo commented 1 year ago

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.

atonb6 commented 1 year ago

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.

adripo commented 1 year ago

I have the same problem. Has anyone found a workaround in the meantime?

robizzt commented 1 year ago

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;
});
barryhughes commented 1 year ago

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):

Screenshot 2023-04-17 at 09 27 24

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):

Screenshot 2023-04-17 at 09 38 49
BE-Zizoo commented 1 year ago

Hello @barryhughes . this is for NL-be

barryhughes commented 1 year ago

Thanks for confirming, @BE-Zizoo. So again this is a case where the relevant translation is missing/needs to be updated:

Screenshot 2023-04-17 at 10 08 49

You can submit a correction over here.

BE-Zizoo commented 1 year ago

@barryhughes Thx for the feedback. I Updated the translation for NL-BE.

namiokuzono commented 1 year ago

The same issue was reported here: 6075371-zen — The "Addresses" was missing from English (Canada) file.

barryhughes commented 1 year ago

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.

DeepVoid commented 1 year ago

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 👍

rodrigo-crosara commented 1 year ago

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;
});
barryhughes commented 1 year ago

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:

Screenshot 2023-05-19 at 13 00 04
matheuscgr commented 1 year ago

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.

daliborpuljiz commented 1 year ago

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?

barryhughes commented 1 year ago

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.

guliyevravan commented 11 months ago

I found the problem.

Do not use the "New language" option when adding a new language.

Screenshot 2023-11-15 224904

Just copy the language in which you installed WordPress. In my example, this language is Turkish.

Screenshot 2023-11-15 230324

Screenshot 2023-11-15 225425

CAUSE OF THE PROBLEM

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.

freecookbr commented 11 months ago

There is some fix for this issue? So many years after this issue was found and this insist to happen!

barryhughes commented 11 months ago

@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:

kankadev commented 8 months ago

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.

barryhughes commented 8 months ago

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:

https://translate.wordpress.org/projects/wp-plugins/woocommerce/stable/de-at/default/?filters[term]=address&filters[term_scope]=scope_any&filters[status]=current_or_waiting_or_fuzzy_or_untranslated&filters[with_plural]=yes&filters[user_login]=&filter=Apply+Filters&sort[by]=priority&sort[how]=desc

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.