[GitHub] cloudstack issue #1669: Make CloudStack JSP-free
Github user rhtyd commented on the issue: https://github.com/apache/cloudstack/pull/1669 During build step, the l10n JS files are built: > [INFO] --- exec-maven-plugin:1.2.1:exec (generate-sources) @ cloud-client-ui --- > Exporting compiled dictionary: /home/bhaisaab/Lab/apache/cloudstack/client/../ui/l10n//nb_NO.js > Exporting compiled dictionary: /home/bhaisaab/Lab/apache/cloudstack/client/../ui/l10n//ca.js > Exporting compiled dictionary: /home/bhaisaab/Lab/apache/cloudstack/client/../ui/l10n//ko_KR.js > Exporting compiled dictionary: /home/bhaisaab/Lab/apache/cloudstack/client/../ui/l10n//de_DE.js > Exporting compiled dictionary: /home/bhaisaab/Lab/apache/cloudstack/client/../ui/l10n//es.js > [Warning] Found a duplicate translation for key label.provider > [Warning] Found a duplicate translation for key label.quota.value > [Warning] Found a duplicate translation for key label.release.dedicated.vlan.range > [Warning] Found a duplicate translation for key label.add.isolated.guest.network > [Warning] Found a duplicate translation for key label.na > [Warning] Found a duplicate translation for key label.instances > [Warning] Found a duplicate translation for key message.desc.created.ssh.key.pair > [Warning] Found a duplicate translation for key label.advanced.search > Exporting compiled dictionary: /home/bhaisaab/Lab/apache/cloudstack/client/../ui/l10n//en.js > Exporting compiled dictionary: /home/bhaisaab/Lab/apache/cloudstack/client/../ui/l10n//fr_FR.js > Exporting compiled dictionary: /home/bhaisaab/Lab/apache/cloudstack/client/../ui/l10n//ar.js > Exporting compiled dictionary: /home/bhaisaab/Lab/apache/cloudstack/client/../ui/l10n//zh_CN.js > Exporting compiled dictionary: /home/bhaisaab/Lab/apache/cloudstack/client/../ui/l10n//nl_NL.js > Exporting compiled dictionary: /home/bhaisaab/Lab/apache/cloudstack/client/../ui/l10n//ru_RU.js > Exporting compiled dictionary: /home/bhaisaab/Lab/apache/cloudstack/client/../ui/l10n//it_IT.js > Exporting compiled dictionary: /home/bhaisaab/Lab/apache/cloudstack/client/../ui/l10n//pt_BR.js > Exporting compiled dictionary: /home/bhaisaab/Lab/apache/cloudstack/client/../ui/l10n//hu.js > Exporting compiled dictionary: /home/bhaisaab/Lab/apache/cloudstack/client/../ui/l10n//pl.js > Exporting compiled dictionary: /home/bhaisaab/Lab/apache/cloudstack/client/../ui/l10n//ja_JP.js > Some screenshots with existing translation/language options: ![screenshot from 2016-08-30 23-29-33](https://cloud.githubusercontent.com/assets/95203/18100796/f313a1d8-6f09-11e6-932a-8f596be6ccad.png) ![screenshot from 2016-08-30 23-29-46](https://cloud.githubusercontent.com/assets/95203/18100820/ffd44896-6f09-11e6-9fd4-d0e1c108cb80.png) ![screenshot from 2016-08-30 23-30-11](https://cloud.githubusercontent.com/assets/95203/18100837/0ad13d9e-6f0a-11e6-9487-a3432f1f8633.png) --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack issue #1669: Make CloudStack JSP-free
Github user milamberspace commented on the issue: https://github.com/apache/cloudstack/pull/1669 @rhtyd Probably the best way will be to change the Transifex L10N resources files type from Unicode Properties to JSON Key/value A sample are here: https://www.transifex.com/ke4qqq/CloudStack_UI/47xmessagesjson/ We can create the 4.10 json l10n files and change the translation update process to get the json files instead of the properties. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack issue #1669: Make CloudStack JSP-free
Github user rhtyd commented on the issue: https://github.com/apache/cloudstack/pull/1669 Thanks @milamberspace I've modified the build process to generate l10n translation JS (dictionary) files when client/UI is built. I think if we use json file, then also we will need some sort of transformation build step so we can consume from messages.properties without changing any of our workflow if we don't have a way to directly translate into the `.js` files. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack issue #1669: Make CloudStack JSP-free
Github user abhinandanprateek commented on the issue: https://github.com/apache/cloudstack/pull/1669 LGTM on code review. Another disadvantage of jsp is the compilation. No jsp will mean smoother transitions to newer java versions. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack issue #1669: Make CloudStack JSP-free
Github user rhtyd commented on the issue: https://github.com/apache/cloudstack/pull/1669 CloudStack UI used dictionary, dictionary2 and index jsp files. The dictionary jsp files simply added a dictionary (java script object or map) by reading through messages properties for various translations. Replacing them was easy, we added a python script (`tools/transifex/gen-l10n.py`) that would generate js files (at build time) by reading through the `messages` files such that the generated dictionary (object or map) would be exactly same as what the jsp files did. The `index.jsp` file primarily did two things: (1) include dictionary, dictionary2 jsp files, (2) used them for translating strings. By replacing the dictionary jsp files with auto-generated translation js file based on a `lang` cookie exactly the same dictionary object was still accessible to the index.jsp file. All the translated strings in index.jsp were replaced with a new/custom `DOM` element ``, and some code was added that would process and add text to this new dom element based on the translation key set. Replacement of `` was done with a search/replace operation. By adding a new custom `DOM` element, no CSS changes were required. The translation was done by this method: https://github.com/shapeblue/cloudstack/blob/26b591f225abbee8690c20af914f8e37103043ef/ui/index.html#L1746 The only exception were `select` dropdowns, where translation was done explicitly by getting the DOM element and injecting `options` as seen here: https://github.com/shapeblue/cloudstack/blob/26b591f225abbee8690c20af914f8e37103043ef/ui/index.html#L1766 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack issue #1669: Make CloudStack JSP-free
Github user borisstoyanov commented on the issue: https://github.com/apache/cloudstack/pull/1669 LGTM, I've checkout the PR, builded it and deployed a simulator zone, then ran through a few localizations and did exploratory testing in the UI, all seem to work fine. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack issue #1669: Make CloudStack JSP-free
Github user rhtyd commented on the issue: https://github.com/apache/cloudstack/pull/1669 @blueorangutan package --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack issue #1669: Make CloudStack JSP-free
Github user blueorangutan commented on the issue: https://github.com/apache/cloudstack/pull/1669 @rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack issue #1669: Make CloudStack JSP-free
Github user rhtyd commented on the issue: https://github.com/apache/cloudstack/pull/1669 (I checked debian pkg failed due to dns/name resolution issue). --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack issue #1669: Make CloudStack JSP-free
Github user rhtyd commented on the issue: https://github.com/apache/cloudstack/pull/1669 @milamberspace since this changes the way translations are consumed, would you help review/test this? Thanks. FYI - this does not change how translation workflow works. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack issue #1669: Make CloudStack JSP-free
Github user jburwell commented on the issue: https://github.com/apache/cloudstack/pull/1669 @milamberspace to pile onto @rhtyd's comment, I would like to get this change into 4.10.0.0 which freezes Sunday (25 Sept 2016). --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack issue #1669: Make CloudStack JSP-free
Github user jburwell commented on the issue: https://github.com/apache/cloudstack/pull/1669 LGTM based on code review --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack issue #1669: Make CloudStack JSP-free
Github user jburwell commented on the issue: https://github.com/apache/cloudstack/pull/1669 @blueorangutan package --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack issue #1669: Make CloudStack JSP-free
Github user blueorangutan commented on the issue: https://github.com/apache/cloudstack/pull/1669 @jburwell a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack issue #1669: Make CloudStack JSP-free
Github user blueorangutan commented on the issue: https://github.com/apache/cloudstack/pull/1669 Packaging result: âcentos6 âcentos7 âdebian. JID-23 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack issue #1669: Make CloudStack JSP-free
Github user jburwell commented on the issue: https://github.com/apache/cloudstack/pull/1669 @milamberspace are you +1/LGTM on this PR? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack issue #1669: Make CloudStack JSP-free
Github user milamberspace commented on the issue: https://github.com/apache/cloudstack/pull/1669 Not look good to me, I've found these issues: The quote ' in French UI (and other language using quote) is precede by a backslash: ![selection_342](https://cloud.githubusercontent.com/assets/3995882/18814768/ff6e26be-8314-11e6-8325-51b0146d53ee.png) ![selection_341](https://cloud.githubusercontent.com/assets/3995882/18814770/08b094f0-8315-11e6-98e3-34726b8984a3.png) In Korean (and other language not fully translated), the default language (EN) is not use to display the missing translations: ![selection_343](https://cloud.githubusercontent.com/assets/3995882/18814785/3c012eb4-8315-11e6-9db5-237378f3c552.png) ![selection_344](https://cloud.githubusercontent.com/assets/3995882/18814787/416b4650-8315-11e6-8c22-fc6da1f89cc3.png) Also, the generated files under the directory client/ui/l10n/ (*.js) must have the Apache license header. (and probably add the l10n directory into the project's gitignore ) I don't like the idea that we have two L10N files for each language (the message_xx.properties and the (generated) xx.js. I thinks we should study to change the current process from/in transifex (move to JSON key/value file instead of the current message.properties) --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack issue #1669: Make CloudStack JSP-free
Github user rhtyd commented on the issue: https://github.com/apache/cloudstack/pull/1669 Thanks @milamberspace I'll fix them, the issues come up due to differences in how java/jsp urlencoded the translation strings and how the python based messages.properties->l10n js file converter escapes the unicode strings. The approach to move from messages.properties to json can be done in the next step, as that will require change in the transifex workflow -- while this PR aims at removing jsps without changing the transifex workflow. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack issue #1669: Make CloudStack JSP-free
Github user rhtyd commented on the issue: https://github.com/apache/cloudstack/pull/1669 @milamberspace I've fixed the issues that were raised and few other unescaped characters I found from the generated l10n js files. The `label.affinity.groups` translation does not exist in korean message.properties file so the label is not found and hence not translated and we see the label/key. Please re-review. Thanks. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack issue #1669: Make CloudStack JSP-free
Github user jburwell commented on the issue: https://github.com/apache/cloudstack/pull/1669 @rhtyd @milamberspace I have started a conversation on dev@ to discuss transitioning to the JSON format. Is acceptable to hold this PR until we come to consensus on that thread? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack issue #1669: Make CloudStack JSP-free
Github user milamberspace commented on the issue: https://github.com/apache/cloudstack/pull/1669 @rhtyd in the normal case, if the key label.affinity.groups doesn't exists, the default language is display ("Affinity Groups" in this case). The PR is a regression for this case (vs the current 4.9 version). @rhtyd the quote issue is now fixed on my test platform. @jburwell the json key/vleu format seems a good way. I will try to test the changes of current transifex process to move to json file next weekend (1st oct). --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack issue #1669: Make CloudStack JSP-free
Github user jburwell commented on the issue: https://github.com/apache/cloudstack/pull/1669 @milamberspace I agree because it appears to remove the need to maintain the Python compilation script which reduces complexity and doesn't add any more build time. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack issue #1669: Make CloudStack JSP-free
Github user rhtyd commented on the issue: https://github.com/apache/cloudstack/pull/1669 @jburwell even with change in transifex format [1], some transformation and conversion of json to a js dictionary would still be needed. @milamberspace I've fixed the issues now. Please re-review thanks. [1] http://docs.transifex.com/formats/json --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack issue #1669: Make CloudStack JSP-free
Github user rhtyd commented on the issue: https://github.com/apache/cloudstack/pull/1669 @jburwell @milamberspace with the current changes, no explicit change in workflow is needed but may be change in future. Since the aim of the PR was to get rid of jsps, I would like to avoid too many changes. Please re-review and comment if we can accept the PR without changing the transifex format/workflow. @abhinandanprateek @murali-reddy can you help with an additional review, thanks? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack issue #1669: Make CloudStack JSP-free
Github user milamberspace commented on the issue: https://github.com/apache/cloudstack/pull/1669 @rhtyd I've just tests successfully the last version of the PR. Now if the value isn't translate, the default language is display. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack issue #1669: Make CloudStack JSP-free
Github user rhtyd commented on the issue: https://github.com/apache/cloudstack/pull/1669 Thanks @milamberspace is that a LGTM? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack issue #1669: Make CloudStack JSP-free
Github user milamberspace commented on the issue: https://github.com/apache/cloudstack/pull/1669 @rhtyd Yes LGTM. Now (and in another PR), I would like work to try to use directly the json key/value files from Transifex. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack issue #1669: Make CloudStack JSP-free
Github user rhtyd commented on the issue: https://github.com/apache/cloudstack/pull/1669 @milamberspace thanks, yes please proceed with changing transifex format following merge of this PR. I lack experience with Transifex usage, but I can help with transforming the current messages.properties file to json etc. Let me know what I would need to do. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack issue #1669: Make CloudStack JSP-free
Github user rhtyd commented on the issue: https://github.com/apache/cloudstack/pull/1669 With the tests and lgtms, I'll go with merging this. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack issue #1669: Make CloudStack JSP-free
Github user rhtyd commented on the issue: https://github.com/apache/cloudstack/pull/1669 @milamberspace I've started a new ticket to track progress on migration of transifex to json format: https://issues.apache.org/jira/browse/CLOUDSTACK-9513 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---