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

Summary of how we do localization in this repo #43202

Merged
merged 3 commits into from
Sep 9, 2024

Conversation

marcpopMSFT
Copy link
Member

No description provided.

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Infrastructure untriaged Request triage from a team member labels Sep 4, 2024
documentation/project-docs/Localization.md Outdated Show resolved Hide resolved
documentation/project-docs/Localization.md Outdated Show resolved Hide resolved
documentation/project-docs/Localization.md Outdated Show resolved Hide resolved
@WeihanLi
Copy link
Contributor

WeihanLi commented Sep 5, 2024

Is there any guide for external contributors when introducing new text that needs to be translated

@marcpopMSFT
Copy link
Member Author

@WeihanLi what's missing from this guide? Adding the string to the resx, building, and submitting all of the xlf files along with the change should be sufficient for internal or external contributors.

@WeihanLi
Copy link
Contributor

WeihanLi commented Sep 7, 2024

@marcpopMSFT
for example, when introducing new text, should non-English xlf files submit the same content as the English version, or should we keep it empty and mark the translation state new, assume we have auto-translate job or something likes that? or should we translate the content and mark it as translated

For example, which of the following is recommended

  1. empty translated content with state new
<trans-unit id="hello">
  <source>Hello</source>
  <target state="new"></target>
  <note />
</trans-unit>
  1. Same content as English version and state is new
<trans-unit id="hello">
  <source>Hello</source>
  <target state="new">Hello</target>
  <note />
</trans-unit>
  1. Translated content and state is translated
<trans-unit id="hello">
  <source>Hello</source>
  <target state="translated">你好</target>
  <note />
</trans-unit>

@KalleOlaviNiemitalo
Copy link

@WeihanLi, I understand from the text

Making changes

The local dev build automatically generates updates to the xlf files that contain the translations. You can see the UpdateXlf task in the binlog to see that in action.

When making string changes, update the resx, build, and check in all xlf file changes

that a developer who adds strings to resx, should only commit those xlf updates that the build system makes automatically, and should not otherwise edit the xlf files.

@baronfel
Copy link
Member

baronfel commented Sep 7, 2024

@KalleOlaviNiemitalo is correct - developers should only ever create English strings. The process of running the build will generate all the required placeholder entire for the other language translations, which should be committed by the developer.

@WeihanLi
Copy link
Contributor

WeihanLi commented Sep 7, 2024

get it, thanks very much @KalleOlaviNiemitalo @baronfel @marcpopMSFT

@marcpopMSFT
Copy link
Member Author

I added a clarifying sentence but folks above already covered that devs should never be modifying the xlf files directly.

@marcpopMSFT marcpopMSFT merged commit 59b0ee6 into main Sep 9, 2024
37 checks passed
@marcpopMSFT marcpopMSFT deleted the marcpopMSFT-locsummary branch September 9, 2024 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Infrastructure untriaged Request triage from a team member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants