From 6be848b10fe89d8ff3dc01724aafd0e57212d618 Mon Sep 17 00:00:00 2001 From: Aral Balkan Date: Fri, 5 Nov 2021 13:31:08 +0000 Subject: [PATCH 1/2] =?UTF-8?q?Closes=20#147:=20provide=20reason=20why=20s?= =?UTF-8?q?tring=20templates=20shouldn=E2=80=99t=20be=20used?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Specifically, because they cannot be localised. --- writing-apps/code-style.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/writing-apps/code-style.md b/writing-apps/code-style.md index 0e4cde4..d7da322 100644 --- a/writing-apps/code-style.md +++ b/writing-apps/code-style.md @@ -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): ```csharp var string = @"Error parsing config: $(config_path)"; From ceed4dd2848fe84bcbb2d4c0188fcc7945520325 Mon Sep 17 00:00:00 2001 From: Aral Balkan Date: Sat, 11 Dec 2021 11:38:30 +0000 Subject: [PATCH 2/2] Reword reason --- writing-apps/code-style.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/writing-apps/code-style.md b/writing-apps/code-style.md index d7da322..0508e06 100644 --- a/writing-apps/code-style.md +++ b/writing-apps/code-style.md @@ -310,7 +310,7 @@ print ("Hello World"); ## String Formatting -Avoid using literals when formatting strings, as they cannot be [localized](https://wiki.gnome.org/TranslationProject/DevGuidelines): +Avoid using literals when formatting strings, as they will not appear in the list of strings for translation during localization: ```csharp var string = @"Error parsing config: $(config_path)";