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

UI & log i18n #22

Open
Toparvion opened this issue May 23, 2019 · 2 comments
Open

UI & log i18n #22

Toparvion opened this issue May 23, 2019 · 2 comments

Comments

@Toparvion
Copy link
Owner

Because initially AnaLog was developed and used by single team only, it wasn't internationalized in any way and supported one language only (Russian). As the number of installations grows, the need arises to support other languages. Of course, English is the first one. But in case of AnaLog the i18n implies significant changes both in client (front) layer and in server (backed) layer, because the last contains a lot of log messages that should be clear for the AnaLog administrator. Except that, there are plans to modernize the front layer of AnaLog.

As a result, it doesn't seem sensible to support flexible i18n in current application state. Instead, it would be enough just to translate current messages into English and then publish the new release as is. This should satisfy both English-only speaking users as well as non-native English speaking users. And then implement the "real" i18n as a part of the modernization.

This issue assumes basic (1-to-1) translation only.

@Toparvion Toparvion self-assigned this May 23, 2019
@Toparvion Toparvion added enhancement in-progress Issues which are currently being solved labels May 23, 2019
Toparvion added a commit that referenced this issue Jun 10, 2019
This is actually not an i18n solution but a quick fix until next
frontend refactoring
@Toparvion
Copy link
Owner Author

In order to keep current AnaLog users experience smooth, the solution has been implemented as something in between the complete i18n and the one suggested in the issue's description.
There are two supported languages currently: English and Russian. And there are two scopes they are applied: web UI & certain log messages (for AnaLog administrators). Both are controlled with two new configuration settings:

spring:
  mvc:
    locale: en      # as of v0.12 supported locales are: en, ru
# Uncomment following 3 lines if the above locale is set to 'ru'    
#  resources:
#    static-locations: 
#      - 'classpath:/static/ru'  

Such an approach doesn't look simple nor flexible, doesn't support dynamic language switch (application restart needed) and produces significant code duplication but this is the simplest and fastest way so far to achieve the goal on the current stage. It is deliberately left undocumented because it will definitely be changed in subsequent releases.
Instead of documenting, the behavior of the application is adapted to most users requirements by selecting English language as default.

@Toparvion
Copy link
Owner Author

Toparvion commented Jun 11, 2019

@gamefundas, the translation alongside with log access restriction have been published with v0.12 release.

If you want, you can additionally check the translation, for example, by examining notification.constant.js file.

I'm leaving this issue for you to close it or to continue the conversation. Looking forward for your feedback.

@Toparvion Toparvion added waiting for feedback and removed in-progress Issues which are currently being solved labels Jun 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant