Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed the issue #54 #57

Merged
merged 10 commits into from
Mar 14, 2014
Merged

Fixed the issue #54 #57

merged 10 commits into from
Mar 14, 2014

Conversation

praful94
Copy link
Contributor

Changed the files fr_g.pog, ja_g.pog and their corresponding .mo files - fr_g.mo, ja_g.mo - are generated by compiling the newly generated .pog files - in the folder /vesuvius/res/locale/ . Now "search" link is displayed correctly.
Only 4 files need to be changed.

@ramdesh
Copy link
Member

ramdesh commented Mar 14, 2014

Fixing individual translation files is inconsequential to the actual bug, which lies in either how the sahana.pot file or in the code itself based on the way the offending string was placed within the _t() function. And please do not commit personal changes to .htaccess. Thanks for the effort! Closed without merging.

@ramdesh ramdesh closed this Mar 14, 2014
@praful94
Copy link
Contributor Author

Sorry, Sir, for the ".htaccess" file.
Sir, can you please have a look at my following approach to the problem:

The translated text in fr_g.pog(for french) and ja_g.pog(for japanese) was written in the wrong way (actually anchor tag was not properly closed), so I corrected it and generated new ".mo" files (because ".mo" files are used for translation) using the instructions given in vesuvius/res/build_pog with the help of command "msgfmt -cv -o file.mo file.pog" and it resolved the issue #54 .
e.g. French translation of "You may wish to perform a <a href="search">quick search before reporting. Otherwise..." is written wrongly on line 1470 in "fr_g.pog". Same is the case for japanese translation. However, as machine readable files are used for translation i.e. ".mo" are used, so I compiled the new ".pog" files to update "_.mo" files .
Regarding the string in _t() function, I concluded:

  1. If its translation is not present in "_.pog" file it won't get translated.
  2. If its translation is present in "*.pog" file it will display the fixed translated value as written in "fr_g.pog" or "ja_g.pog". So if "fixed translated value" is itself wrong in these ".pog" files, there is nothing we can do with _t() function to change them.

So, we are mainly concerned with "fr_g.mo" and "ja_g.mo" files, as they are responsible for the true translation of the given string. So these are the files that need to be updated.

@ramdesh
Copy link
Member

ramdesh commented Mar 14, 2014

Hi @praful94, thanks for your input, but these translations files are of no major importance at this point. What we need to do is, regenerate the sahana.pot file using /res/build_pot.sh and see if the tag is not properly sent there again. If this is the issue, we need to fix the specific _t() function where the tag is included along with a string. I believe this is at https://github.com/sahana/vesuvius/blob/master/vesuvius/mod/report/main.inc#L72

@praful94
Copy link
Contributor Author

Thanks sir for your reply. I got what you are saying, but please just have a look at the following once:
1)When wrong french translation was present
image of the wrong translation:
wrong_french

At this time, snapshot of translating line in res/locale/fr_g.pog.You can clearly see improper anchor tag.
wrong_translation

2) When french translation is correct
image of the right translation
right_french

At this time snapshot of translating in res/locale/fr_g.pog. You can clearly see properly corrected anchor tag
right_translation

I just request you to please try with these 4 updated files:
fr_g.pog
fr_g.mo
ja_g.pog
ja_g.mo

I am sure it will correct the issue #54 . And if I'm wrong, can you please tell me what is the purpose of line 1470 in "fr_g.pog". Because I think that if this line is wrong, then translation will always get displayed wrong no matter what we do to string in _t() function.

Thanks.

@ramdesh
Copy link
Member

ramdesh commented Mar 14, 2014

Accepting this pull request to give kudos for effort. Thanks!

ramdesh added a commit that referenced this pull request Mar 14, 2014
@ramdesh ramdesh merged commit 92c4289 into sahana:master Mar 14, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants