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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃寪 [i18n-DE] Translating docs to German #1645

Closed
17 tasks done
martinbrose opened this issue Sep 7, 2023 · 21 comments
Closed
17 tasks done

馃寪 [i18n-DE] Translating docs to German #1645

martinbrose opened this issue Sep 7, 2023 · 21 comments
Labels
documentation Improvements or additions to documentation

Comments

@martinbrose
Copy link
Contributor

martinbrose commented Sep 7, 2023

Hi!

Let's bring the documentation to all the German-speaking community 馃寪

Who would want to translate? Please follow the 馃 TRANSLATING guide. Here is a list of the files ready for translation. Let us know in this issue if you'd like to translate any, and we'll add your name to the list.

Some notes:

  • Please translate using an informal tone (imagine you are talking with a friend about huggingface_hub 馃).
  • Please translate in a gender-neutral way.
  • Add your translations to the folder called de inside the source folder.
  • Register your translation in de/_toctree.yml; please follow the order of the English version.
  • Once you're finished, open a pull request and tag this issue by including #issue-number in the description, where issue-number is the number of this issue. Please ping @Wauplin @stevhliu for review.
  • 馃檵 If you'd like others to help you with the translation, you can also post in the 馃 forums.

README

Get Started section

Guides section

@martinbrose
Copy link
Contributor Author

Hi @Wauplin and @stevhliu,

I have started a German translation of the docs. Mainly for myself in order to deeply understand the hub functionalities along the way. I'll release translated docs as I go along.

What do you prefer?

  1. A separate pull request per translated doc, to get this updated as soon as a translation is available; or
  2. One pull request collating all the translated guides?

@martinbrose
Copy link
Contributor Author

martinbrose commented Sep 7, 2023

One more thing I want to mention:
In the task template, you request an informal tone for the translation, which I guess would be addressing people with "Du" vs the formal "Sie". See an overview of the differences here.

However, when looking at the German translation for Transformers, the formal "Sie" seems to have been used. Hence, I also used "Sie" to keep the help docs consistent.

Do you have any strong opinions about this topic?

@martinbrose martinbrose changed the title [i18n-DE] Translating docs to German 馃寪 [i18n-DE] Translating docs to German Sep 7, 2023
@Wauplin
Copy link
Contributor

Wauplin commented Sep 7, 2023

Thanks for opening this issue and proactively working on it @martinbrose! Please let me know if you have any questions about the English documentation.

In the task template, you request an informal tone for the translation, which I guess would be addressing people with "Du" vs the formal "Sie". See an overview of the differences here. However, when looking at the German translation for Transformers, the formal "Sie" seems to have been used. Hence, I also used "Sie" to keep the help docs consistent.
Do you have any strong opinions about this topic?

That's a good question. I'm not opinionated about how to address people in German but I'd be in favor in following transformers's docs, just for consistency. So let's use the more formal Sie then :)

What do you prefer?

  • A separate pull request per translated doc, to get this updated as soon as a translation is available; or
  • One pull request collating all the translated guides?

Not much preferences to be honest. I'd say 1 PR every time you work on translating documentation. If you do 3 guides in a row, then let's have 1 PR for 3 guides. If you've only done half of a guide, that's also fine for a PR as long as you document the fact that it's not complete. The most important part IMO is to mention you're working on a section beforehand so that we don't have duplicate work if other German-speaking community members starts helping on this issue (so all good, since you've already mentioned your sections in this issue description).

@martinbrose
Copy link
Contributor Author

Actually, I might have two questions:

  1. The template mentions "(currently 0 out of 267 complete)". What exactly is this referring to?
  2. The README.md lives in the root folder of the repo and not in the docs/source folder. Where should the translated version be saved to?

@Wauplin
Copy link
Contributor

Wauplin commented Sep 7, 2023

What exactly is this referring to?

No idea. I just removed it 馃槃

Where should the translated version be saved to?

You can do as the transformers library that has the main README.md in english and then other languages in separate files (e.g. README_es.md for Spanish). Then it'd be cool to refer all languages from one README to another like it's done here.

@julien-c
Copy link
Member

julien-c commented Sep 7, 2023

You can do as the transformers library that has the main README.md in english and then other languages in separate files (e.g. README_es.md for Spanish).

maybe still ping @mishig25 to check if it's (that specific point of the README) the current best practice for doc structuration? cc @osanseviero too

@stevhliu
Copy link
Member

stevhliu commented Sep 7, 2023

The template mentions "(currently 0 out of 267 complete)". What exactly is this referring to?

I think this was referring to the number of docs in 馃 Transformers.

@martinbrose
Copy link
Contributor Author

You can do as the transformers library that has the main README.md in english and then other languages in separate files (e.g. README_es.md for Spanish).

maybe still ping @mishig25 to check if it's (that specific point of the README) the current best practice for doc structuration? cc @osanseviero too

For now, I have saved it as README_de.md.
@mishig25 and @osanseviero, looking forward to your best practice input.

@martinbrose
Copy link
Contributor Author

martinbrose commented Sep 11, 2023

I finished the first round of translations into German.
In the forums, I requested help with proof-reading. Let's hope that someone is happy to help.

@mishig25
Copy link
Contributor

@mishig25 and @osanseviero, looking forward to your best practice input.

Hi @martinbrose, for now, the current practice of having README_[lang].md works 馃憤

@Wauplin
Copy link
Contributor

Wauplin commented Sep 19, 2023

@Wauplin
Copy link
Contributor

Wauplin commented Sep 19, 2023

@martinbrose I realized a few things when going through the docs:

  1. On the home page, there are links for the reference and conceptual guides sections that are broken (doesn't exist in Deutsch). What I would suggest is:
    1. For now, link them to the English docs with a small warning in the test (something like "Umfassende und technische Beschreibung der Klassen und Methoden von huggingface_hub (auf Englisch).")
    2. Translate the Git vs HTTP page to English (optional or can be done later)
    3. Do not translate the reference pages. Most of the content is in English anyway because it's pulled from the method's docstrings.
  2. I should update the issue template to reflect those.

Apart from that, everything looks good to me. Well done! 馃嚛馃嚜

@martinbrose
Copy link
Contributor Author

Hi @Wauplin,

no prob. Will attend to this in the next couple of days.

@martinbrose
Copy link
Contributor Author

Ok, Git vs HTTP page is done.

However, I unfortunately have no idea how to link the package_reference guides from the German docs to the English version. Tried a few things and read the info on https://github.com/huggingface/doc-builder, but no idea.

@Wauplin
Copy link
Contributor

Wauplin commented Sep 20, 2023

However, I unfortunately have no idea how to link the package_reference guides from the German docs to the English version.

Hmm, that's a good question I haven't thought about. I see 2 options: either remove the Referenz section or hardcode the URL to redirect to the EN main docs. I'd be more in favor of the second option as it's better for users to know the section exists rather than not showing it. So something like href="https://huggingface.co/docs/huggingface_hub/main/en/package_reference/overview" should be good enough. The only caveats are that local docs will still redirect to the published ones + it redirects to main instead of the current version but those are minor issues IMO.

cc @mishig25 if you have a better idea.

@martinbrose
Copy link
Contributor Author

@Wauplin I pushed the additional translated file to the original translation branch 1602-docs-German-translation.

Should I just re-open an additional pull request based on that branch or create a new branch, add the file and create the pull request from there?

@Wauplin
Copy link
Contributor

Wauplin commented Sep 20, 2023

Should I just re-open an additional pull request based on that branch or create a new branch, add the file and create the pull request from there?

@martinbrose I think the easiest is to create a new branch directly from this one, merge main into it and push that to the Github:

git checkout main
git pull origin main
git checkout 1602-docs-German-translation
git checkout -b 1602-more-german-translation
git merge origin main
git push

If you get a merge conflict while merging main into the new branch and it's too complicated to fix it then it's best to start from a clean state and add the file there.

@martinbrose
Copy link
Contributor Author

HI @Wauplin,

I decided the no-experiments route and started a new branch from main. ;)
Pushed it as part of #1686.

I still struggle with the Reference guides though. I tried several things in the _toctree.yml within docs/source/de but to no avail. Not sure if the doc-builder actually supports providing URLs in the TOC?

@Wauplin
Copy link
Contributor

Wauplin commented Sep 22, 2023

Not sure if the doc-builder actually supports providing URLs in the TOC?

Hey @martinbrose sorry I couldn't check this today. I'll have to postpone to Monday. Thanks for looking into it though. I'll find a solution somehow, otherwise we'll just "remove" the section in the TOC. Have a nice weekend!

@Wauplin
Copy link
Contributor

Wauplin commented Sep 25, 2023

I decided the no-experiments route and started a new branch from main. ;)

That was most likely for the best 馃槃 I've just reviewed and merged #1686!
About the reference package I took the liberty to remove it from the DE docs. Nothing too dramatic in my opinion (guides are the most important part).

@Wauplin
Copy link
Contributor

Wauplin commented Sep 26, 2023

Very nice to have this done!! Big milestone for the German-speaking community!

@Wauplin Wauplin added the documentation Improvements or additions to documentation label Sep 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

5 participants