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 localization #20

Open
paulzakin opened this issue Nov 25, 2023 · 16 comments
Open

Add localization #20

paulzakin opened this issue Nov 25, 2023 · 16 comments
Labels
enhancement You want to improve something

Comments

@paulzakin
Copy link
Collaborator

No description provided.

@paulzakin paulzakin added the enhancement You want to improve something label Nov 25, 2023
@paulzakin
Copy link
Collaborator Author

Closed pending user action

@paulzakin paulzakin closed this as not planned Won't fix, can't repro, duplicate, stale Dec 31, 2023
@parnoldx
Copy link
Contributor

Great app! Would be nice to have a German localization. I am happy to translate if you tell me what to do.

@paulzakin
Copy link
Collaborator Author

Thanks for the interest! Unfortunately, I decided localization is out of the scope of the app for now. If that changes I’ll be sure to reopen this issue.

@parnoldx
Copy link
Contributor

parnoldx commented Nov 19, 2024

Understand. The UI is fine for me. Its more about the foods. Is there a possibility to edit the basic foods and give them local names? Then I just change it for me

@paulzakin
Copy link
Collaborator Author

paulzakin commented Nov 19, 2024

Huh! That’s an interesting idea. Let me think about that. I would have to think of a way to do it but I think it is feasible.

@paulzakin paulzakin reopened this Nov 19, 2024
@paulzakin paulzakin changed the title Add localization to Danish Add localization Nov 19, 2024
@paulzakin
Copy link
Collaborator Author

paulzakin commented Nov 19, 2024

https://github.com/successible/cleanslate/blob/main/src/basicFoods.json

Ok, let's try this! I willing to try to add this gradually. All the basic foods are defined in that file. I added the locale. See line 16 to 17. I used the German (de) language code and I set the key:value property with Google Translate as an example. You can set any key:value pair and the app (in theory, once I code it in) should use it. We are going to have to discuss like interface and stuff later, but let us start with the basics. You can submit a pull request for updates to the basicFoods.json and we can go from there. Let me know if you have questions. I would only do name and maybe(?) countName if you wanted too. The reset are reused values, like categories and TBSP.

@parnoldx
Copy link
Contributor

Cool, thank you! I will translate the file this weekend and will open a PR

@paulzakin
Copy link
Collaborator Author

Sounds good!

@paulzakin
Copy link
Collaborator Author

Merged your PR. Now time to discuss behavior.
Let’s start with search. How do you envision this look like?

@parnoldx
Copy link
Contributor

Nice, maybe I don't understand your question but when type in "Karto" then Kartoffel (Potato) should be found

@paulzakin
Copy link
Collaborator Author

Right but should there be like a mode in Settingd to turn on - say German? And if you search for English for the word as well, should it turn up? Curious on your thoughts.

@paulzakin
Copy link
Collaborator Author

I am inclined to just keep everything in English and if a word matches in a foreign language to just have that name and the countName in the interface change and then I guess in the log as well.

@parnoldx
Copy link
Contributor

Ah I see, I think mostly this would be fine if also english food matches but there are foods that are named identical/almost similar like
Zucchini = Zucchini, then both entries would be shown? That's seems confusing for the user what entry he should choose then.

@paulzakin
Copy link
Collaborator Author

I will have to play around with it - but that’s a good point. I will work on it this weekend

@paulzakin
Copy link
Collaborator Author

Hey @parnoldx just wanted to let you know I didn’t forget about this but I have been super busy recently. Not sure when I’ll get around to it but just wanted to let you know.

@parnoldx
Copy link
Contributor

Thank you for letting me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement You want to improve something
Projects
None yet
Development

No branches or pull requests

2 participants