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

vi: Translate TOC from Running the course to the end of Chromium #1948

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ichxorya
Copy link

I tried to translate the table of contents into Vietnamese.

  • Some keywords are hard to translate, or to clarify my translation, I used parentheses "( )".
  • I don't know if I should keep some keywords in English or not. In this pr I chose to translate them into Vietnamese and keep their original English counterparts in parentheses.
  • I could mention some of them like: build, type inference, trait, move semantics, iterator, panic, unsafe...
  • Some parts overlap with this pr: Translate Day 1 index and Running the course content to Vietnamese #1947

Copy link

google-cla bot commented Mar 29, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@mgeisler mgeisler changed the title Translate Table of Contents into Vietnamese (from Running the course to the end of Chromium) vi: Translate TOC from Running the course to the end of Chromium Apr 5, 2024
@mgeisler
Copy link
Collaborator

mgeisler commented Apr 5, 2024

Hi @ichxorya, thanks a lot for helping out here!

I believe you need to install dprint so you can correct the formatting of the vi.po file. See TRANSLATIONS.md.

@daivinhtran, will be you be able to review this PR? You can also help @ichxorya by reformatting it on your machine (use gh to checkout the branch) and then the correct formatting to the branch. This is possible because @ichxorya kindly enabled the Maintainers are allowed to edit this pull request. setting on the PR.

@ichxorya
Copy link
Author

ichxorya commented Apr 5, 2024

Hi @ichxorya, thanks a lot for helping out here!

I believe you need to install dprint so you can correct the formatting of the vi.po file. See TRANSLATIONS.md.

@daivinhtran, will be you be able to review this PR? You can also help @ichxorya by reformatting it on your machine (use gh to checkout the branch) and then the correct formatting to the branch. This is possible because @ichxorya kindly enabled the Maintainers are allowed to edit this pull request. setting on the PR.

Hello, I believe that I used dprint to format the file (ichxorya@a8f9b5e)

And yes, I'd set the PR setting.
image

@mgeisler
Copy link
Collaborator

mgeisler commented Apr 5, 2024

  • Some keywords are hard to translate, or to clarify my translation, I used parentheses "( )".

Yes, it's very difficult or impossible to translate everything. We don't have a unified approach to this: I think it's fine to keep the English word in parenthesis after the translated word. Perhaps like this:

Translated (English) more translated

where the English word is in italics and the rest is normal.

@daivinhtran
Copy link
Collaborator

@ichxorya To distribute the work easier, would mind splitting the PR into smaller PRs to avoid spanning the translation across too many .md files? For best practice, it's better to focus the translation per .md file so that we don't run into merge conflicts. See #1957 (comment) for some instruction.

@ichxorya
Copy link
Author

ichxorya commented Apr 5, 2024

@ichxorya To distribute the work easier, would mind splitting the PR into smaller PRs to avoid spanning the translation across too many .md files? For best practice, it's better to focus the translation per .md file so that we don't run into merge conflicts. See #1957 (comment) for some instruction.

How should I do that? Can you suggest? This pr is already too large from the beginning.

For now I could close this pr and restart on a smaller range of translation like other pr, if it helps.

@ichxorya ichxorya marked this pull request as draft April 5, 2024 16:45
@daivinhtran
Copy link
Collaborator

Yeah I think opening a new PR with translation for a small set of .md files will be useful. Also update the spreadsheet so others don't attempt what you have already translated.

@mgeisler
Copy link
Collaborator

mgeisler commented Apr 7, 2024

How should I do that? Can you suggest? This pr is already too large from the beginning.

If you need to split up the work, then I know two approaches:

  • You can just open the PO file in a plain text editor and copy-paste the entries you want to different working copies or branches. This works okay if all the changes are in the same region of the very large file.
  • You can use Gettext's msggrep to extract a subset of a PO file into a new PO file. Something like
    msggrep -N src/android.md -N 'src/android/*'
    
    will extract just the messages related to the Android part of the course. After extracting the messages, you will need to put them back into the big PO file, use msgcat and msgmerge for that.

The Gettext tools are a bit clunky, but they can be good if you want to operate on hundreds of entries spread across the PO file. If you only want to deal with a few hand-fulls of messages, then I suggest lots of copy-paste 😄

@mgeisler
Copy link
Collaborator

Hi @ichxorya and @daivinhtran, would one of you be up for reviewing this?

I have update it to resolve the merge conflicts. What I did:

  • Downloaded the vi.po file from this PR. I saved it as vi-pr.po.

  • Used msgcat to combine the new translations here with the existing translations from the main branch:

    msgcat --use-first po/vi.po po/vi-pr.po -o po/vi-cat.po
    
  • This gave me a file that was too big: it also had strings from vi-pr.po which have since then been removed.

  • I used msgmerge to trim the file down to what is actually needed right now:

    msgmerge po/vi-cat.po po/vi.po -o po/vi-cat-merged.po
    
  • Finally, I moved vi-cat-merged.po to vi.po and updated the PR here.

@mgeisler
Copy link
Collaborator

  • Finally, I moved vi-cat-merged.po to vi.po and updated the PR here.

Oh, that was supposed to be the last step, but I also had to merge main into the branch to update the PR. That showed the conflicts in the vi.po file, but I resolved them by simply using the vi.po file generated using the steps above.

@mgeisler
Copy link
Collaborator

How should I do that? Can you suggest? This pr is already too large from the beginning.

The PR is now very small and can actually be reviewed in GitHub! It would be awesome if the two of you could finish this so we can merge it.

@ichxorya
Copy link
Author

How should I do that? Can you suggest? This pr is already too large from the beginning.

The PR is now very small and can actually be reviewed in GitHub! It would be awesome if the two of you could finish this so we can merge it.

I would love to check the commit soon, thank you. However, I'm afraid my contribution has been "outdated" (some were translated after I draft this PR). How did you manage to resolve it?

@mgeisler
Copy link
Collaborator

I would love to check the commit soon, thank you. However, I'm afraid my contribution has been "outdated" (some were translated after I draft this PR). How did you manage to resolve it?

From what I can tell on GitHub, there are no conflicts — the PR will merge cleanly. So you should just un-draft it and get someone to look it over 🎉

@mgeisler
Copy link
Collaborator

@daivinhtran, could you skim through this one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants