User tests: Successful: Unsuccessful:
So this is another thingy I'm offering in the middle of a 1.0 beta release cycle....
Since we already have a somewhat "multilingual experience", it would be good to provide the same functionality to JavaScript files.
The solution proposed here is, as always, highly experimental.
A bower update and composer update are needed.
Easiest test is the preview in our editor (don't forget to clean the cache (as I do always :P )) that should display the translated "Loading preview..." string
OH - don't forget to bower install ;)
So running make langfiles gives me many errors like this:/vagrant/src/JTracker/g11n/de-DE/de-DE.JTracker.js.po:25:12: invalid multibyte sequence
The same is for RU files.
But the translations are working and that is awesome ![]()
Should be fixed - Thanks ![]()
Yeap, fixed. But now there is another problem - files are incorrectly merged after make langfiles:
#: /www/jtracker/core/js/jtracker.js:22
/www/jtracker/core/js/jtracker.js:43
msgid "Invalid response."
msgstr "Ungültige Antwort"
I get this:
#: /www/jtracker/core/js/jtracker.js:22 /www/jtracker/core/js/jtracker.js:43
msgid "Invalid response."
msgstr "Ungültige Antwort"
which isn't very nice either, but at least it's not a syntax error...
Now this looks to me like another line ending thingy - could you verify that the language files have UNIX style \n's ?
I also got the same "issue" here - no idea what could be causing this :(
could you verify that the language files have UNIX style \n's ?
How to verify it?
PHPStorm shows it in the status bar (LF, CRLF, or CR)
Another question: How does the pot file look like ? Did you run make langtemplates and did that alter the pot file ?
The last resource that occurs to me is hacking again the output of the command... nobody's perfect - not even Linux :P
So just checked - langfiles and templates are CRLF, but after make langtemplates and then make langfiles those are LF :) BTW I get the same as you:
#: /www/jtracker/core/js/jtracker.js:22 /www/jtracker/core/js/jtracker.js:43
msgid "Invalid response."
msgstr "XYZ...файлы"
But the main thing is that translations are working ![]()
So if the problem above is not a blocker then we could merge this PR.
Sorry but I didn't get the solution you found :(
Under what circumstances you get this error result ?
Can we do anything to avoid it ?
Under what circumstances you get this error result result ?
Seems like it was a CRLF problem. After make langtemplates and then make langfiles files become LF and problem disappears. But only this remains:
#: /www/jtracker/core/js/jtracker.js:22 /www/jtracker/core/js/jtracker.js:43
OK that makes it easier... I searched a bit and the gettext utilities definitely have a problem with non UNIX style line endings.
I added a check and those files will be rejected from now when running make langfiles - apologies ;)
The remaining "issue" (multiple files on a single line)- I don't know what to do about it... At least it's not a syntax error and PHPStorm is still able to jump to the correct file:line on Ctrl+CLICK ![]()
Everything is good. As I understand these translation files also will go to the Transifex?
Actually only the pot files go to Transifex. I suppose they will handle line endings better than we do ;)
BTW I missed it - who deletes the branches: owner or person who merge?
Whoever is first I guess ;)
Looks awesome :)