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

Support i18n #140

Open
fhunleth opened this issue Dec 14, 2019 · 1 comment
Open

Support i18n #140

fhunleth opened this issue Dec 14, 2019 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@fhunleth
Copy link
Member

All text is currently hardcoded English strings. This issue is for refactoring the code base to support translations.

@fhunleth fhunleth added the help wanted Extra attention is needed label Dec 14, 2019
@lucaong
Copy link
Contributor

lucaong commented Feb 26, 2020

One proposal that could make this simpler, and also help with #117, would be to let users optionally "bring their own UI" by providing a Plug to be used for the UI in router.ex in place of the default one that renders index.html.

For example, the configuration could be:

config :vintage_net_wizard,
  ui: MyCustomWizardUIPlug

and the router.ex could use it as:

ui_plug = Application.get_env(:vintage_net_wizard, :ui, DefaultUIPlug)

# Here I an namespacing the UI under /ui, which I think is a good idea
# if we make the UI customizable
forward "/ui", to: ui_plug

# Other API endpoints could stay as they are, so the UI can use them:
forward "/api/v1", to: VintageNetWizard.Web.Api

This is a relatively small change that would enable users to customize the UI without having to fork the project. It would also make further development on the project more flexible, clarify what part is public API that one can rely upon and what part is private implementation details, and make it possible for people to create alternative wizard UIs (maybe including I18n) and offer them as libraries.

WDYT?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants