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

Add nls support in config files, add pt-pt translation #572

Merged
merged 9 commits into from
Jul 15, 2016

Conversation

iled
Copy link
Contributor

@iled iled commented Jul 14, 2016

These commits add a complete Portuguese (pt-pt) translation to CMV, including:

  • all core widgets
  • viewer main menu
  • other config files
  • page titles

viewer.js and the other config files didn't have support for nls, so it was also added. All input text included in each config file is stored in nls/main.js. E.g.,

// http://dojotoolkit.org/reference-guide/1.10/dojo/i18n.html
define({
    root: {
        basemaps: {
            ...
        },
        bookmarks: {
            ...
        },
        otherWidget: {
            ...
        },
        viewer: {
            operationalLayers: {
                damageAssessment: 'Damage Assessment',
            },
            titles: {
                header: 'Configurable Map Viewer',
                pageTitle: 'Configurable Map Viewer',
                subHeader: 'make it your own'
            },
            widgets: {
                bookmarks: 'Bookmarks',
                directions: 'Directions',
                draw: 'Draw',
                ...
            }
        }
    },
    'pt-pt': true
});

Other changes included:

  • dropped a deprecated layer reference in config/identify.js
  • normalized keys to camelCase format, in cases where they were PascalCase or kebab-case
  • add Null Island bookmark, as suggested by @tmcgee

I started this translation by forking a repo by @carrbrpoa.

@tmcgee tmcgee added this to the v1.4.0 milestone Jul 14, 2016
@tmcgee tmcgee self-assigned this Jul 14, 2016
@tmcgee
Copy link
Member

tmcgee commented Jul 14, 2016

@iled travis found some eslint errors. indentation in some of pt-pt resource files and a 3 missing semicolons 😉 in config files. the errors are spelled out in the log here. If you run the grunt lint command on your local copy, you can see the errors there too.

@DavidSpriggs thoughts?

@iled
Copy link
Contributor Author

iled commented Jul 15, 2016

Fixed eslint errors.

Reverted renaming Esri basemaps.

@tmcgee
Copy link
Member

tmcgee commented Jul 15, 2016

@iled all looks good to me.

Let's see if @DavidSpriggs has any comments about the approach I recommended for i18n in the config files.

@DavidSpriggs
Copy link
Member

DavidSpriggs commented Jul 15, 2016

Looks good. Pulling in the i18n works for now. If we ever want pure Json config files we will have to rethink this approach. This occurs in other places too.

@DavidSpriggs DavidSpriggs merged commit b4bb19c into cmv:develop Jul 15, 2016
@DavidSpriggs
Copy link
Member

Thanks @iled !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants