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

Modify Homebrewery strings to allow alternate languages #2624

Open
G-Ambatte opened this issue Jan 22, 2023 · 13 comments · May be fixed by #3198
Open

Modify Homebrewery strings to allow alternate languages #2624

G-Ambatte opened this issue Jan 22, 2023 · 13 comments · May be fixed by #3198
Assignees
Labels
Epic feature UI/UX User Interface, user experience

Comments

@G-Ambatte
Copy link
Collaborator

G-Ambatte commented Jan 22, 2023

Your idea:

Modifying Homebrewery to use a file containing all of the text strings presented to the end user will allow the creation of string files for alternate languages, and the site can then be switched between translations as desired by the user.

@5e-Cleric 5e-Cleric added feature Epic UI/UX User Interface, user experience labels Jan 22, 2023
@5e-Cleric
Copy link
Member

If this feature is approved, i will take responsability for the Spanish (es-es) and Catalan (ca-es) translation, for the forseeable future.

i'm guessing once more than one language is set up, adding extra languages should be a minor tweak, just another json file maybe.

@5e-Cleric
Copy link
Member

Issue #116 might be a problem

@ericscheid
Copy link
Collaborator

Issue #116 might be a problem

#115 is talking about fonts used in brews. This issue is mainly about the UI strings, which is Open Sans.

Unless we're also talking about translating the strings used in the sample snippets?

@5e-Cleric
Copy link
Member

5e-Cleric commented Jan 31, 2023

Yes, but i would argue that the fact that we translate the UI might make users try to homebrew in their native language, which will get to #116 blocking their progress, let's make this and then we can look into fixing those fonts, yeah?

@ericscheid
Copy link
Collaborator

Yep, one disaster issue at a time.

Also, the brew-document lang doesn't have to be the same as the UI lang. But we know this.

Also, see #1343 for related lang matters ..

hmm .. if someone set their brew lang to es, but kept the UI lang as en .. would the snippets as inserted be in es or en? I would think so. But would the snippet names in the UI also swap to es? Probably not, right?

@5e-Cleric
Copy link
Member

5e-Cleric commented Jan 31, 2023

Snippet names is UI, but content is brew, if a user sets UI lang to es but brew lang to en, the snippet name should change, but the content of it should still be in english.

At least that's what makes sense to me.

Also, we should include language in User settings #1908, do we know when will that be merged? so we have a time limit.

Both are right now in hands of @jeddai i believe, so we need their take on this.

@5e-Cleric
Copy link
Member

5e-Cleric commented Dec 20, 2023

Trying to jump start this issue, or at least get someone else's view on how I could start making progress towards the defined goal.

I believe the original idea was to have a YAML file for every desired UI language, each storing string references and their content in that specific language.

We should come up with a naming convention for strings, to achieve consistency and avoid chaos. Any ideas on that front?
This is obviously just for User facing strings.

This is the first draft for such a YAML file.
base-localization-file.zip
(can't upload a YAML file to GitHub)

@ericscheid
Copy link
Collaborator

Having defined names for specific instances of strings is one approach.

Another approach is to skip the naming entirely, and have the base English strings be the lookup keys, This approach has pros and cons. (Technically, it's still a key:value pairing, it's just that the keys are things like "are you sure you want to log off?" instead of LogOutConfirmQuery).

@ericscheid
Copy link
Collaborator

ericscheid commented Dec 20, 2023

I believe the original idea was to have a YAML file for every desired UI language

I didn't get that impression.

It could instead be one file, maybe like:

accounts-and-session-management:
  Are you sure you want to log off?:
    en-au: Oy mate, be onyer bike now, eh?
    es: ¿Estás seguro/a de que quieres cerrar sesión?
    es-mx: ¿Estás seguro/a de que quieres cerrar sesión?
    fr: Êtes-vous sûr(e) de vouloir vous déconnecter ?
    pt: Tem certeza de que deseja sair?
  another english string:
    (etc)

@5e-Cleric
Copy link
Member

There would be little difference, i guess your approach is easier to implement and smaller in size, let's do that

@5e-Cleric
Copy link
Member

Using ChatGPT to do the bulk of the work, and the first draft of the localization file, i got a nice starting point:

Second version localization file.zip

@G-Ambatte G-Ambatte linked a pull request Dec 21, 2023 that will close this issue
@lucastucious
Copy link
Contributor

I follow this issue, as i would love to translate to French

@5e-Cleric
Copy link
Member

@lucastucious and others, you can follow the instructions given in this document:
https://homebrewery.naturalcrit.com/share/aOAoEOu6BjHa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Epic feature UI/UX User Interface, user experience
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants