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 i18n support #1130

Closed
hfl opened this issue May 3, 2016 · 13 comments
Closed

add i18n support #1130

hfl opened this issue May 3, 2016 · 13 comments

Comments

@hfl
Copy link

hfl commented May 3, 2016

Gollum is not support i18n. I think should add this funtion.

@bartkamphorst
Copy link
Member

I agree. PRs welcome!

@jokester
Copy link

jokester commented Oct 7, 2016

Want i18n on the web interface (not content of pages) as well. Is anybody already working on this?

@bartkamphorst
Copy link
Member

Not that I know of.

@bartkamphorst
Copy link
Member

@jokester Care to contribute a PR?

@jokester
Copy link

bartkamphorst: guess I can do something on i18n of Web UI. Do we have a todo list on this topic?

@bartkamphorst
Copy link
Member

Great! No, there's no todo list as of yet. @dometto Any thoughts about this? One note, when you start work on this, make sure to branch from the 5.x branch.

@dometto
Copy link
Member

dometto commented Oct 11, 2017

No experience with this. @jokester, maybe you can give an indication of how'd you go about this and we can comment on any issues we (hopefully) foresee?

@jokester
Copy link

I made a small list after looking at 5.x branch. Does these todos look valid?

  • extract text resources to separated file (yaml or plain ruby)
  • provide a i18n(phrase_key) method to mustache views/templates
    • in template there will be i18n('home') instead of current Home.
    • simple substitution can be done with i18n(phrase_key, *params), but stuff beyond that (pluralize, date, etc) can make things more complex. Are they needed in gollum at all?
  • some mechanism to select language / pass selection to view
    • a gollum_lang cookie seems valid to me
    • selection is initialized via Accept-Language header, and changed by some <select> / JavaScript in the UI
  • custom templates may choose to do i18n (and follow the same convention) or not.

@dometto
Copy link
Member

dometto commented Jan 14, 2018

@jokester, sorry for the late reply. We would be very happy with this, if you're still able and willing to work on it. The main pointer I can give you now is to open your PR against the 5.x branch. You can open a development PR and we'll be very happy to provide feedback along the way!

@bartkamphorst
Copy link
Member

@jokester I know it's been a while, but would you still be willing to work on i18n support for gollum 5.x?

@bartkamphorst
Copy link
Member

Ping @jokester .

@dometto
Copy link
Member

dometto commented Jun 28, 2021

Implemented by @benjaminwil in #1679! 🥇

@dometto dometto closed this as completed Jun 28, 2021
@benjaminwil
Copy link
Member

I plan to i18n all of the English hard-coded strings in the next couple of weeks.

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

5 participants