? Failure

User tests: Successful: Unsuccessful:

avatar Bakual
Bakual
26 Feb 2019

Crowdin is out of date for the calendar locale (en.js) file.

From what I see it got moved around and renamed with #23723 and #23786 and that broke the Crowdin integration for that file.
This PR would fix the source again.

Now I'm not sure how the resulting filename for the translation should be. Should there be a "es5" within it (which is a problem for Crowdin) or can we do without that and just use the locale like we did before?
Also do we expect more renaming/moving of that file to come?

Pinging @dgrammatiko since it was his PRs.

avatar Bakual Bakual - open - 26 Feb 2019
avatar Bakual Bakual - change - 26 Feb 2019
Status New Pending
avatar Bakual Bakual - change - 26 Feb 2019
Title
Update crowdin.yml
[4.0] Update crowdin.yml
avatar Bakual Bakual - edited - 26 Feb 2019
avatar dgrammatiko
dgrammatiko - comment - 26 Feb 2019

Should there be a "es5" within it

@Bakual the addition of .es5 in the filename is crucial for the build tools as it signifies that this file is not ES6 or web component so that the tools know how to treat it. In sort you cannot remove it!!!

Also do we expect more renaming/moving of that file to come?

No. The tools, for the media_source are completed. There are some changes for the templates but those affect mainly only the scss files

avatar Bakual
Bakual - comment - 26 Feb 2019

the addition of .es5 in the filename is crucial for the build tools as it signifies that this file is not ES6 or web component so that the tools know how to treat it. In sort you cannot remove it!!!

That's unfortunate as it's exactly the type of naming Crowdin can't handle nicely and which I try to remove for other language files. It means we have to manually rename the translated files taken from Crowdin.

That being said, I don't know what exactly the build tools are supposed to do with those files. Imho they just need to be copied over to the /media/ directory. It's not like anything has to be done with them, right? It's just a collection of variables, not real code.

Also what is with the files bg.js, bn.js, ca.js cs.js, cy.js and da.js? I guess those have to be renamed as well?

avatar dgrammatiko
dgrammatiko - comment - 26 Feb 2019

It's not like anything has to be done with them, right?

Since there is only one folder that could have an old ES5 or ES6 or a web component file somehow the tools need to distinguish what kind of operation needs to been done. It's not magic, just something that needs to be there so the tool works out in a predicted pattern.

The best thing is to integrate the crowding fetching part to these tools so all these could be handled in one single command...

avatar Bakual Bakual - change - 26 Feb 2019
Labels Added: ?
avatar Bakual
Bakual - comment - 26 Feb 2019

Since I still don't know what exactly the tools do, I'm just shooting from my hip.
The issue with Crowdin is that it can't nicely replace part of a filename. There is a hack for it, but it doesn't work in all cases. What works well is replacing the either the full filename (without extension) or folders.
So if the filename needs to be in the form somename.es5.js maybe we can work with subfolders like we do in other places in Joomla, moving the locale from the filename to the folder. So instead of calendar-locales/en.es5.js we would get eg calendar-locales/en/calendar.es5.js.
It means some change in the calendar JS but that should be doable I think, maybe even in a B/C way.

The best thing is to integrate the crowding fetching part to these tools so all these could be handled in one single command...

Nah. Crowdin would already support writing back the translated files in form of a PR. It's part of their GitHub integration.
It doesn't make much sense in the current development status but it may (needs to be tested first) be possible in future.
It could also be baked into a build script, but you would need to store an API key somewhere and still would have to deal with the filename conversion. So if we can remove the filename change it's a win either way.

avatar Bakual
Bakual - comment - 26 Feb 2019

Btw still don't know what to do with those files in there that don't have the es5 in it.

avatar dgrammatiko
dgrammatiko - comment - 14 Mar 2019

Btw still don't know what to do with those files in there that don't have the es5 in it.

My bad, all the files in that folder need to be .es5.js...

avatar franz-wohlkoenig franz-wohlkoenig - change - 22 Mar 2019
Category JavaScript
avatar wilsonge wilsonge - change - 18 Apr 2019
Labels Removed: J4 Issue
avatar joomla-cms-bot joomla-cms-bot - change - 18 Apr 2019
Category JavaScript
avatar wilsonge wilsonge - change - 18 Apr 2019
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2019-04-18 22:28:36
Closed_By wilsonge
avatar wilsonge wilsonge - close - 18 Apr 2019
avatar wilsonge wilsonge - merge - 18 Apr 2019
avatar wilsonge
wilsonge - comment - 18 Apr 2019

Thanks!

Add a Comment

Login with GitHub to post a comment