Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I have translate Ubercart3.5 into Chinese, but after import pofile into Drupal, I find there are some string have not been translated in page "admin/store". Include:
1,View orders
2,View and process the orders received through your website.
3,Search orders
4,Search existing orders.
5,View products
6,View and search products available through your website.
Both of them are provided by Views. It will be better to make them translatable.
Comments
Comment #1
longwaveThe items you list are menu item titles and descriptions. This seems to be a limitation in Views or i18n, see:
#1335526: Cannot translate Menu item entry title
#1195102: Views menu item translatable or not ?
#1914996: Cannot localize menus built by contributed modules
I don't think there is anything we can do from Ubercart to help fix this, unless you can suggest something?
Comment #2
g089h515r806 CreditAttribution: g089h515r806 commentedIt is translatable, but could not be translated at localize.drupal.org.
One solution to make them appear at localize.drupal.org is add some unused code at the end of views_default file like this:
t(''Search existing orders.');
Comment #3
g089h515r806 CreditAttribution: g089h515r806 commentedHere is an example code from commerce module:
$translatables['commerce_products'] = array(
t('Defaults'),
t('Products'),
t('more'),
t('Apply'),
t('Reset'),
t('Sort by'),
t('Asc'),
t('Desc'),
t('Items per page'),
t('- All -'),
t('Offset'),
t('SKU'),
t('Title'),
t('Type'),
t('Price'),
t('Status'),
t('Operations'),
t('Filter by SKUs containing'),
t('Admin page'),
);
$views[$view->name] = $view;
return $views;
Comment #4
g089h515r806 CreditAttribution: g089h515r806 commentedComment #5
longwaveBut for commerce_products the menu description is 'Manage products and product types in the store.' yet this does not appear in the translatables list? Simply adding a dummy t() wrapper does not mean the string will be translated everywhere it appears - the links I provided suggest that automatic translation of menu items in Views does not work at present.
If however you have tried adding this yourself to the view and it actually works, can you post a patch with your changes?
Comment #6
TR CreditAttribution: TR commentedComment #7
TR CreditAttribution: TR commentedNo further information provided.