Results 1 to 6 of 6
  1. #1
    Join Date
    Jun 2008
    Location
    Japan
    Posts
    220
    Plugin Contributions
    7

    Default Memo for translators

    This is not a plugin, but more a bunch of information that will save a lot of time to translators.

    With new ZC v2.1.0 nearly all system should be able to switch language smoothly, which was not the case until now with admin menus and plugins, modules...

    Now that is possible, for language pack maker, finding strings to translate might be a challenge. Here is a list of places where you will find them.

    Language files:
    admin/includes/languages/english/
    includes/languages/english/
    zc_install/includes/languages/english/
    zc_plugins/DisplayLogs/vx.x.x/admin/includes/languages/english/
    zc_plugins/POSM/vx.x.x/admin/includes/languages/english/
    zc_plugins/POSM/vx.x.x/catalog/includes/languages/english/
    zc_plugins/POSM/vx.x.x/installer/languages/english/
    zc_plugins/SystemInspection/x.x.x/admin/includes/languages/english/
    zc_plugins/SystemInspection/x.x.x/installer/languages/english/

    Images buttons (You need an image editor too to create new buttons):
    includes/templates/template_default/buttons/english

    Hard coded strings (this part is only used one time before installation):
    includes/templates/template_default/templates/tpl_zc_install_suggested_default.php
    includes/templates/template_default/templates/tpl_zc_phpupgrade_default.php


    Database configuration menus:
    These are all the admin menus and submenus. You can find them in files before intallation or on an installed cart they are in database, at least for parts that have been installed.

    IN FILES:
    zc_install/sql/install/mysql_zencart.sql
    On all lines starting by:
    'INSERT INTO configuration' or 'INSERT IGNORE INTO configuration', look for values of fields 'configuration_title' and 'configuration_description'.
    'INSERT INTO configuration_group', look for values of fields 'configuration_title' (second one) and 'configuration_description' (third one).
    'INSERT INTO product_types', look for values of second field 'type_name'.
    'INSERT INTO product_type_layout', look for values of fields 'configuration_title' and 'configuration_description'.

    zc_plugins/DisplayLogs/vx.x.x/installer/ScriptedInstaller.php
    Look for 'configuration_title' and 'configuration_description' definitions.

    zc_plugins/POSM/vx.x.x/admin/installer/ScriptedInstaller.php
    After '"INSERT IGNORE INTO " . TABLE_CONFIGURATION . " ... VALUES', look fo first and fourth field of each values lines.


    Plugin names and description:
    zc_plugins/PLUGIN_NAME/PLUGIN_VERSION/manifest.php
    Look for 'pluginName' and 'pluginDescription' definitions.


    For modules shipping, payment and order total:
    includes/modules/(shipping, payment or order_total)/MODULE_NAME.php
    Look for 'function install()' which contains SQL queries with 'configuration_title' and 'configuration_description'.


    IN DATABASE:
    Modules or plugins not installed won't have their English strings registered in database!!!

    Table 'configuration', fields 'configuration_title' and 'configuration_description'.
    Table 'configuration_group', fields 'configuration_title' and 'configuration_description' (not really used).
    Table 'product_types', field 'type_name'.
    Table 'product_type_layout', fields 'configuration_title' and 'configuration_description'.
    Table 'plugin_control', fields 'name' and 'description'.


    Database fields to be translated through admin interface:
    Table 'categories_description', fields 'categories_name' and 'categories_description'.
    Menu : Catalog::Categories/Products -> Click on 'Edit' icon for a category.
    Table 'meta_tags_categories_description', fields 'meta_tags_title', 'meta_tags_keywords' and 'meta_tags_description'.
    Menu : Catalog::Categories/Products -> Click on 'Edit Meta Tags' icon for a category.

    Table 'coupons_description', fields 'coupon_name' and 'coupon_description'.
    Menu : Discounts::Coupon Admin -> Select a coupon and click on 'Edit' button.

    Table 'ezpages_content', fields 'pages_title' and 'pages_html_text'.
    Menu : Tools::EZ-Pages -> Select a page and click on 'Edit' button.

    Table 'products_description', fields 'products_name' and 'products_description'.
    Menu : Catalog::Categories/Products -> Click on category until product listing displays -> Click on 'Edit Product' icon for a product.
    Table 'meta_tags_products_description', fields 'meta_tags_title', 'meta_tags_keywords' and 'meta_tags_description'.
    Menu : Catalog::Categories/Products -> Click on category until product listing displays -> Click on 'Edit Meta Tags' icon for a product.

    Table 'products_options', fields 'products_options_name' and 'products_options_comment'.
    Menu : Catalog::Option Name Manager -> Click on 'Edit' button for an option.

    Table 'orders_status', field 'orders_status_name'.
    Menu : Localization::Orders Status -> Select a status and click on 'Edit' button.



    Looking at this list, you can imagine how much work it is to make a full language pack...
    When all these strings have been translated you need to put them at the right place too, but this will be for another post.

  2. #2
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    10,313
    Plugin Contributions
    125

    Default Re: Memo for translators

    @pilou2 Would you like to create a PR for the doc repo with this information? Perhaps to

    https://docs.zen-cart.com/dev/langua...language_pack/

    or maybe a new page in that folder?
    That Software Guy. My Store: Zen Cart Support
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  3. #3
    Join Date
    Jun 2008
    Location
    Japan
    Posts
    220
    Plugin Contributions
    7

    Default Re: Memo for translators

    Quote Originally Posted by swguy View Post
    @pilou2 Would you like to create a PR for the doc repo with this information? Perhaps to

    https://docs.zen-cart.com/dev/langua...language_pack/

    or maybe a new page in that folder?
    No problem, I will just need time to learn how to do it. Plus this post is half of what I am preparing. Next part is how to semi automaticaly extract these strings and format them to fit in language files, making it easier to translate.

  4. #4
    Join Date
    Jun 2008
    Location
    Japan
    Posts
    220
    Plugin Contributions
    7

    Default Re: Memo for translators

    Forgot this one in the list of database fields to be translated through admin interface:

    If POSM has been installed:
    Table 'products_options_stock_names' field 'pos_name'.
    Menu : Catalog::Manage Options' Stock -> Click on 'Define Labels' button -> Select a label and click on 'Edit' button.

    It is pretty hard to find it...

  5. #5
    Join Date
    Jun 2008
    Location
    Japan
    Posts
    220
    Plugin Contributions
    7

    Default Re: Memo for translators

    Quote Originally Posted by swguy View Post
    @pilou2 Would you like to create a PR for the doc repo with this information? Perhaps to

    https://docs.zen-cart.com/dev/langua...language_pack/

    or maybe a new page in that folder?
    @swguy
    I have just submited a new page on GitHub dev documentation. Please have a look and feel free to correct or modify it. Links to this page from other pages/menus will need to added .

  6. #6
    Join Date
    Jun 2008
    Location
    Japan
    Posts
    220
    Plugin Contributions
    7

    Default Re: Memo for translators

    I forgot to add the link to the new documentation page:
    https://docs.zen-cart.com/dev/langua..._to_translate/

    Even with these information, it is still complicated to extract English strings from database/files, especially for translators who are not much into coding. To prepare the work for them, I did the extraction of English strings and conversion to ZC language files for all admin menus and other database saved texts in ZC and few plugins.
    Using these files, a translator 'just' have to rename all english folders to the new language and then translate all files contents, which is still a lot of work.
    At the end, adding this translation to standard ZC languages files translation will result in a near 100% translation of ZC.

    I am not sure yet where to put these files. For now they are on my GitHub repo:
    https://github.com/piloujp/Zen-Cart-...tion/tree/main

 

 

Similar Threads

  1. v155 Product Memo only visible for admin?
    By dachilla in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 15 Apr 2017, 09:23 PM
  2. Replies: 0
    Last Post: 3 Feb 2010, 10:53 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR