Skip to content

Feature: Multi-language support#249

Merged
sdorra merged 6 commits into
angular-dashboard-framework:masterfrom
momentumsoftwareab:feature/language-support
May 27, 2016
Merged

Feature: Multi-language support#249
sdorra merged 6 commits into
angular-dashboard-framework:masterfrom
momentumsoftwareab:feature/language-support

Conversation

@chaaya

@chaaya chaaya commented May 26, 2016

Copy link
Copy Markdown
Contributor

Feature

  • Native out of the box support for English(default) and Swedish.
  • Can be configured via the dashboardProvider.
  • Translations/langauges can be added to the framework.

Why?

It can seem to be little bit tacky when a system doesnt uses English, in my case our system is in Swedish and all adf labels/tooltips are in English. I think the language support takes the framework to the next level.

Hope you like it :)

chaaya added 2 commits May 26, 2016 15:07
The framework now supports both English and Swedish out of the box.
Users can add own translations via the dashboardProvider.
@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.4%) to 92.963% when pulling 2439cdc on momentumsoftwareab:feature/language-support into 3b910f9 on angular-dashboard-framework:master.

@sdorra sdorra self-assigned this May 26, 2016
@sdorra sdorra added this to the v0.12.0 milestone May 26, 2016
@sdorra

sdorra commented May 26, 2016

Copy link
Copy Markdown
Member

Looks really nice. Great job. I would love to see it in the next version.

But i'm not sure if i like the name "culture", i think i would feel more comfortable with a name like i18n, locale, l10n or something like this. Is there a special reason for culture?

Do we need a new module or could we add it to adf.provider, to reduce complexity?

@sdorra

sdorra commented May 26, 2016

Copy link
Copy Markdown
Member

This would fix #102

@sdorra

sdorra commented May 26, 2016

Copy link
Copy Markdown
Member

The documentation should be placed elsewhere in the wiki, extra file or we could add some extra pages to the api documentation. But i think the readme would get too long.

@chaaya

chaaya commented May 26, 2016

Copy link
Copy Markdown
Contributor Author

I had a hard time deciding the name to be honest :) I have used kendo alot and they are using culture, but a culture also has an affect on dateformats and stuff, so it may be the wrong module name to use.

adf.locale is good module name.

dashboardProvider.setLocale('en-US')

I think it should be a own module, since it has a very narrow scope. That helps with the unit testing if we where to extend the locacle module with its own provider and translation factory that we later could inject into the dashboardProvider.
Maybe I could fix that in the future, but this works for now.

Sound good?

PS. I will update the naming from culture to locale tomorrow :)

@sdorra

sdorra commented May 26, 2016

Copy link
Copy Markdown
Member

Yes, sounds good for me.

chaaya added 2 commits May 27, 2016 10:50
Updated all related variable and function names to use locale instead of
culture.
Should create a wiki page for this instead.
@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.4%) to 92.963% when pulling 8bec896 on momentumsoftwareab:feature/language-support into 3b910f9 on angular-dashboard-framework:master.

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.4%) to 92.963% when pulling 98005b7 on momentumsoftwareab:feature/language-support into 874c6ac on angular-dashboard-framework:master.

@sdorra sdorra merged commit bf1603d into angular-dashboard-framework:master May 27, 2016
@sdorra

sdorra commented May 27, 2016

Copy link
Copy Markdown
Member

Thank you very much.

@sdorra sdorra mentioned this pull request May 27, 2016
@chaaya

chaaya commented May 27, 2016

Copy link
Copy Markdown
Contributor Author

@sdorra thank u :) would love som help regarding the wiki. Maybe we can take that privately over gitter?

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