Jump to content

Are translation catalog automatically update?


El Pipo
 Share

Recommended Posts

Hi all,

I think I read all devdoc regarding translation.

I did had this code in src/Core/Form/ChoiceProvider/CanonicalRedirectTypeChoiceProvider.php:

        $movedPermanentlyMessage = $this->translator->trans(
            '301 Moved Permanently (recommended once you have gone live)',
            [],
            'Admin.Shopparameters.Feature'
        );

        // New
        $goneMessage = $this->translator->trans(
            '410 Gone (recommended once your redirect is also gone)',
            [],
            'Admin.Shopparameters.Feature'
        );

        return [
            $noRedirectionMessage => 0,
            $movedTemporaryMessage => 1,
            $movedPermanentlyMessage => 2,
            // New
            $goneMessage => 3,
        ];

I hope to see a new entry going to the back-office translation tool in the BO. But this new translation did not appear.

In the doc (https://devdocs.prestashop.com/1.7/development/internationalization/translation/translation-tips/) it's written:

Quote

Before every minor release, the whole source code for PrestaShop and Native Modules is analyzed using TranslationToolsBundle, and all newly discovered wordings are automatically added to the default catalogue.

Is this automatic? If not, is there a way to trigger catalogue's rebuild? How?

Best regards,

Share this post


Link to post
Share on other sites

To make it up a bit, here are the result of my last week tests :

Use of 

php bin/console translation:update

doesn't produce anything: normal at no time this process knows it should look in src/Core php files.

The file t9n.yml :

cache_dir: /tmp/TranslationTool/
paths:
  - classes
  - controllers
  - admin-dev
  - modules
  - src
  - override
  - install-dev
  - themes
  - pdf
  - mails/themes
exclude_files:
  - src/PrestaShopBundle/Tests
  - classes/PrestaShopAutoload.php
  - var/cache/
  - var/logs
  - node_modules
  - vendor
  - tools
  - mails/[a-zA-Z]{2}/
  - js
  - modules/ps_themecusto

looks to be involved, but I didn't find any script calling it (google didn't help me too).

I didn't find anything in tools/build.

Any idea?

Best regard,

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More