Update in LocalizationExample #8828

Merged
merged 7 commits into from Aug 30, 2014

Projects

None yet

5 participants

@Denisov21
Contributor

No description provided.

@Denisov21 Denisov21 changed the title from Create package.json to Update in LocalizationExample Aug 21, 2014
@peterflynn peterflynn commented on an outdated diff Aug 22, 2014
src/extensions/samples/LocalizationExample/package.json
@@ -0,0 +1,16 @@
+{
+ "name": "localization-example",
+ "title": "LocalizationExample",
+ "description": "LocalizationExample.",
+ "homepage": "https://github.com/adobe/brackets/tree/master/src/extensions/samples/LocalizationExample",
+ "version": "1.0.0",
+ "author": "",
+ "license": "MIT",
+ "engines": {
+ "brackets": ">=0.42.0"
+ },
+ "i18n": [
+ "en",
+ "fr"
@peterflynn
peterflynn Aug 22, 2014 Member

Nit: these should be indented one more level, like the "engines" section above

@Denisov21
Contributor

@peterflynn Done, you can merge!

@TomMalbran TomMalbran commented on the diff Aug 22, 2014
src/extensions/samples/LocalizationExample/README.md
@@ -48,6 +48,8 @@ Move this plugin to the extensions\user\ folder to run the plugin. It will add a
* main.js – loads the Strings module for the plugin and uses mustache to localize html content
+* package.json - add the translation languages as in the example: `"i18n: ["en", "fr" ]`
+
* strings.js – uses i18n to load a strings.js file in the nls folder
* htmlContent
@TomMalbran
TomMalbran Aug 22, 2014 Contributor

This was an error from before. But since you are editing this file, would you mind fixing the indentation here? This and the next line should be indented 4 more spaces. Thanks

@Denisov21
Contributor

@TomMalbran Done!

@ingorichter
Contributor

@TomMalbran Can we merge this?

@TomMalbran TomMalbran and 1 other commented on an outdated diff Aug 26, 2014
src/extensions/samples/LocalizationExample/README.md
* strings.js – uses i18n to load a strings.js file in the nls folder
-* htmlContent
- * htmlfragment.html – html template to be localized by mustache
- * nls
- * strings.js – configures i18n by specifying the root folder and listing the locales supported by the plugin
- * root
+ * htmlContent
@TomMalbran
TomMalbran Aug 26, 2014 Contributor

This is still not quite right. It should be:

    * htmlContent
        * htmlfragment.html – html template to be localized by mustache
    * nls
        * strings.js – configures i18n by specifying the root folder  and listing the locales supported by the plugin
        * root
            * strings.js – contains the English strings
        * fr
            * strings.js – contains the French strings
        * etc. for each locale
@ingorichter
ingorichter Aug 27, 2014 Contributor

Okay, then we'll take it for Release 44. Thanks.

@TomMalbran
Contributor

@ingorichter The folder list is still not quite right. That should be fixed. We can still merge it and fix it if you want it for the next release.

@MarcelGerber MarcelGerber commented on the diff Aug 26, 2014
src/extensions/samples/LocalizationExample/README.md
@@ -48,17 +48,19 @@ Move this plugin to the extensions\user\ folder to run the plugin. It will add a
* main.js – loads the Strings module for the plugin and uses mustache to localize html content
+* package.json - add the translation languages as in the example: `"i18n: ["en", "fr" ]`
@MarcelGerber
MarcelGerber Aug 26, 2014 Member

We may point out that this step is optional.

@TomMalbran
TomMalbran Aug 26, 2014 Contributor

Everything here is optional. But if you are adding translations, is better if you add this.

@MarcelGerber MarcelGerber commented on an outdated diff Aug 26, 2014
src/extensions/samples/LocalizationExample/README.md
* strings.js – uses i18n to load a strings.js file in the nls folder
-* htmlContent
- * htmlfragment.html – html template to be localized by mustache
- * nls
- * strings.js – configures i18n by specifying the root folder and listing the locales supported by the plugin
- * root
+ * htmlContent
+ * htmlfragment.html – html template to be localized by mustache
+ * nls
+ * strings.js – configures i18n by specifying the root folder and listing the locales supported by the plugin
@MarcelGerber
MarcelGerber Aug 26, 2014 Member

Nit: two spaces (before and)

@MarcelGerber MarcelGerber commented on an outdated diff Aug 26, 2014
src/extensions/samples/LocalizationExample/package.json
@@ -0,0 +1,16 @@
+{
+ "name": "localization-example",
+ "title": "LocalizationExample",
+ "description": "LocalizationExample.",
+ "homepage": "https://github.com/adobe/brackets/tree/master/src/extensions/samples/LocalizationExample",
+ "version": "1.0.0",
+ "author": "",
@MarcelGerber
MarcelGerber Aug 26, 2014 Member

I'd update the metadata to something more usual, like (without the comments):

{
    "title": "Localization Example", // include a space to show the title can include spaces
    "description": "A guide on how to localize your extension.",
    "author": "The Brackets team"
}
@Denisov21
Contributor

Hi @ingorichter, I made the changes suggested by @MarcelGerber

@MarcelGerber
Member

The README is still not quite right (see the parsed version). Just copy and paste the markdown:

* htmlContent
    * htmlfragment.html – html template to be localized by mustache
* nls
    * strings.js – configures i18n by specifying the  root folder and listing the locales supported by the plugin
    * root
        * strings.js – contains the English strings
    * fr
        * strings.js – contains the French strings
    * etc. for each locale
@Denisov21
Contributor

Hi @MarcelGerber, Ready for a final check! Sorry for the error.

@MarcelGerber
Member

Looks good. (But I can't merge, so let's wait for @TomMalbran)

@TomMalbran
Contributor

It looks good to me too. Lets merge it :)

@TomMalbran TomMalbran merged commit 771c3e3 into adobe:master Aug 30, 2014

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment