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

[docs] add localization doc #462

Merged
merged 3 commits into from
Mar 31, 2022
Merged

Conversation

strega-nil-ms
Copy link
Contributor

No description provided.

@vicroms
Copy link
Member

vicroms commented Mar 28, 2022

We should add a link to this in the contributor guidelines.

docs/localization.md Outdated Show resolved Hide resolved
docs/localization.md Outdated Show resolved Hide resolved
docs/localization.md Outdated Show resolved Hide resolved
Copy link
Member

@vicroms vicroms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some suggestions feel free to disregard.

docs/localization.md Outdated Show resolved Hide resolved
docs/localization.md Outdated Show resolved Hide resolved
docs/localization.md Outdated Show resolved Hide resolved
docs/localization.md Outdated Show resolved Hide resolved
Comment on lines +31 to +37
The comment is used to give context to the translator as to what a placeholder will be replaced with.
For example, in `BuildResultSummaryHeader` (`"SUMMARY FOR {triplet}"`),
it will note that an example of `{triplet}` is `'x64-windows'`.
Most message placeholders (see `messages.h` for the full list - search for `DECLARE_MSG_ARG`) have comments associated with them already.
Only general placeholders like `{value}`, `{expected}`, and `{actual}` don't have comments associated with them.
If you use any of these placeholders, write `example of {<name>} is '<expected-value>'` for each of those placeholders,
separated by `\n`. You can also add context if you feel it's necessary as the first line.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This part is a bit hard to follow. Maybe we should start with an example of an existing message that uses all parameters and break down each part of the declaration.

docs/localization.md Outdated Show resolved Hide resolved
docs/localization.md Outdated Show resolved Hide resolved
docs/localization.md Outdated Show resolved Hide resolved
docs/localization.md Outdated Show resolved Hide resolved
@strega-nil-ms
Copy link
Contributor Author

@vicroms I don't know where to link in contributor guidelines; we probably need to rewrite those a bit

docs/localization.md Outdated Show resolved Hide resolved
docs/localization.md Outdated Show resolved Hide resolved
Co-authored-by: Victor Romero <romerosanchezv@gmail.com>
@strega-nil-ms strega-nil-ms merged commit 27cb637 into microsoft:main Mar 31, 2022

### Putting it All Together

Let's create a vcpkg hello world command to show off how one can use the messages API.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm still not a fan of including a real example with a lot of code that's likely to rot rather than just linking to a real use but not over my dead body.

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

Successfully merging this pull request may close these issues.

5 participants