OpenDevelopmentMekong / wp-odm_profile_pages

Wordpress plugin for exposing custom content type for profile pages
https://opendevelopmentmekong.net
GNU General Public License v3.0
0 stars 2 forks source link

[TASK] Translate EIA report and Not found string #224

Closed S-mardii closed 2 years ago

S-mardii commented 2 years ago

Fixed #223

S-mardii commented 2 years ago

@EricSoroos A minor bug on translation string was found in the previous commit. I have fixed it in this PR, please review and merge the code. Our team will perform another testing and then we will notify you to push this code to the production server.

EricSoroos commented 2 years ago

Pushed to pp

S-mardii commented 2 years ago

Thank you @EricSoroos Looks good on PP. Please pull the code to Production.

arky commented 2 years ago

@S-mardii Please kindly double check your work and ensure this is final code deployment. Constant and minor changes without writing tests introduces bugs and also saps developer time from other significant pressing issues. Thanks!

EricSoroos commented 2 years ago

@S-mardii Up on production

S-mardii commented 2 years ago

@EricSoroos as this PR is updating the PO file, is there any command needed to run on the server to make sure that the new string translation is used?

arky commented 2 years ago

@S-mardii Double check your browser cache. If this is wordpress page, clear the wordpress cache.

I think it is too late for @EricSoroos to respond right now.

EricSoroos commented 2 years ago

I followed the same procedure on prod as pre-prod. If the updates you made showed on preprod, then I'd expect them to work on production.

I've got a last revision date on the po file of 2022-02-21 22:43+0700, so it looks like the most recent version is there.

S-mardii commented 2 years ago

Thank you @arky and @EricSoroos

S-mardii commented 2 years ago

@EricSoroos As WP would use the .mo file for the translation, do we need to compile the updated .po file to .mo file on the server?

Ps: .mo is listed in the .gitignore, so it is not pushed to the git repo.

arky commented 2 years ago

@S-mardii Please kindly follow the good developer practices in future. Please file anew PR, commenting on merged pull reports is not productive. Thanks.

EricSoroos commented 2 years ago

The .mo files on PP were not updated:

odm@odm-pp:~/odm-wordpress/wordpress/wp-content/plugins/wp-odm_profile_pages$ find . -name '*.po' | xargs ls -l
-rw-r--r-- 1 odm odm 11734 Aug  7  2018 ./i18n/wp-odm_profile_pages-en.po
-rw-rw-r-- 1 odm odm 25351 Feb 21 16:59 ./i18n/wp-odm_profile_pages-km.po
-rw-r--r-- 1 odm odm 11845 Aug  7  2018 ./i18n/wp-odm_profile_pages-lo.po
-rw-r--r-- 1 odm odm 11819 Aug  7  2018 ./i18n/wp-odm_profile_pages-my.po
-rw-r--r-- 1 odm odm 11846 Aug  7  2018 ./i18n/wp-odm_profile_pages-th.po
-rw-r--r-- 1 odm odm 11822 Aug  7  2018 ./i18n/wp-odm_profile_pages-vi.po
odm@odm-pp:~/odm-wordpress/wordpress/wp-content/plugins/wp-odm_profile_pages$ find . -name '*.mo' | xargs ls -l
-rw-r--r-- 1 odm odm 19960 Aug  7  2018 ./i18n/wp-odm_profile_pages-km.mo
-rw-r--r-- 1 odm odm   739 Aug  7  2018 ./i18n/wp-odm_profile_pages-lo.mo
-rw-r--r-- 1 odm odm   713 Aug  7  2018 ./i18n/wp-odm_profile_pages-my.mo
-rw-r--r-- 1 odm odm   740 Aug  7  2018 ./i18n/wp-odm_profile_pages-th.mo
-rw-r--r-- 1 odm odm   716 Aug  7  2018 ./i18n/wp-odm_profile_pages-vi.mo

Prod is the same.

So, If PP is working, and above you said it was, then prod should work. If not, then there's something else going on.

If PP is not working, then the manual review process on PP is not working, and we probably need to run msgfmt on the .po files.

From a process point of view, I'd prefer that we have .mo files checked into the repository and kept in sync with the .po files, unless there's some larger concatenation process that needs to happen. Since we don't have this process setup for the wordpress extensions, I'd guess that each of the extensions handles it's own translations.

S-mardii commented 2 years ago

@EricSoroos Noted. Thank you for the information. I will remove *.mo from .gitignore and push the .mo file to the repo in a new PR.