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

Closes #147: provide reason why string templates shouldn’t be used #148

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion writing-apps/code-style.md
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ print ("Hello World");

## String Formatting

Avoid using literals when formatting strings:
Avoid using literals when formatting strings, as they cannot be [localized](https://wiki.gnome.org/TranslationProject/DevGuidelines):
Copy link
Collaborator

Choose a reason for hiding this comment

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

How about using "translated" instead of "localised"? That would not need any link.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hey there, feels like localized is more precise. The strings can be translated (if someone translates them) but they cannot be localized (ie., those translations cannot be used within the app).

Perhaps: “…as they will not appear in the list of translatable strings for localization.”

Copy link
Collaborator

@jeremypw jeremypw Dec 11, 2021

Choose a reason for hiding this comment

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

Hmm, not sure. I am trying to find a non-technical wording so that no explanatory link is necessary. How about something like "... as any translation of them will not appear in the app"


```csharp
var string = @"Error parsing config: $(config_path)";
Expand Down