From 1da914e15dd88baf037e5af990eb9c61f1d73fb0 Mon Sep 17 00:00:00 2001
From: Eitot <Eitot@users.noreply.github.com>
Date: Tue, 7 Jan 2025 06:08:03 +0100
Subject: [PATCH] Mark several localisable strings as 'should not translate'

---
 Vienna/Interfaces/Base.lproj/InfoWindow.xib   | 16 ----
 .../Base.lproj/Preferences.storyboard         | 77 ++-----------------
 .../Interfaces/mul.lproj/MainMenu.xcstrings   |  6 +-
 .../mul.lproj/MainWindowController.xcstrings  |  9 ++-
 .../mul.lproj/Preferences.xcstrings           | 35 +++++----
 Vienna/Resources/InfoPlist.xcstrings          |  9 ++-
 Vienna/Resources/Localizable.xcstrings        | 12 +--
 Vienna/Sources/Alerts/SmartFolder.m           | 16 ++--
 8 files changed, 56 insertions(+), 124 deletions(-)

diff --git a/Vienna/Interfaces/Base.lproj/InfoWindow.xib b/Vienna/Interfaces/Base.lproj/InfoWindow.xib
index d5752ed21b..6c77f73490 100644
--- a/Vienna/Interfaces/Base.lproj/InfoWindow.xib
+++ b/Vienna/Interfaces/Base.lproj/InfoWindow.xib
@@ -50,14 +50,6 @@
                             <font key="font" metaFont="systemBold"/>
                             <color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
                             <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
-                            <attributedString key="userComments">
-                                <fragment content="Do not localize">
-                                    <attributes>
-                                        <font key="NSFont" metaFont="smallSystem"/>
-                                        <paragraphStyle key="NSParagraphStyle" alignment="natural" lineBreakMode="wordWrapping" baseWritingDirection="natural" tighteningFactorForTruncation="0.0"/>
-                                    </attributes>
-                                </fragment>
-                            </attributedString>
                         </textFieldCell>
                     </textField>
                     <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" preferredMaxLayoutWidth="150" translatesAutoresizingMaskIntoConstraints="NO" id="33">
@@ -74,14 +66,6 @@
                             <font key="font" metaFont="smallSystem"/>
                             <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
                             <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
-                            <attributedString key="userComments">
-                                <fragment content="Do not localize">
-                                    <attributes>
-                                        <font key="NSFont" metaFont="smallSystem"/>
-                                        <paragraphStyle key="NSParagraphStyle" alignment="natural" lineBreakMode="wordWrapping" baseWritingDirection="natural" tighteningFactorForTruncation="0.0"/>
-                                    </attributes>
-                                </fragment>
-                            </attributedString>
                         </textFieldCell>
                     </textField>
                     <box verticalHuggingPriority="750" boxType="separator" translatesAutoresizingMaskIntoConstraints="NO" id="95">
diff --git a/Vienna/Interfaces/Base.lproj/Preferences.storyboard b/Vienna/Interfaces/Base.lproj/Preferences.storyboard
index bedc6dbe55..e2f90516bc 100644
--- a/Vienna/Interfaces/Base.lproj/Preferences.storyboard
+++ b/Vienna/Interfaces/Base.lproj/Preferences.storyboard
@@ -287,76 +287,13 @@
                                     <font key="font" metaFont="menu"/>
                                     <menu key="menu" id="Awq-ex-o9L">
                                         <items>
-                                            <menuItem title="1" state="on" id="Byc-c2-qnN">
-                                                <attributedString key="userComments">
-                                                    <fragment content="Do not localize">
-                                                        <attributes>
-                                                            <font key="NSFont" metaFont="menu" size="11"/>
-                                                            <paragraphStyle key="NSParagraphStyle" alignment="natural" lineBreakMode="wordWrapping" baseWritingDirection="natural" tighteningFactorForTruncation="0.0"/>
-                                                        </attributes>
-                                                    </fragment>
-                                                </attributedString>
-                                            </menuItem>
-                                            <menuItem title="2" id="ILd-2a-Vjb">
-                                                <attributedString key="userComments">
-                                                    <fragment content="Do not localize">
-                                                        <attributes>
-                                                            <font key="NSFont" metaFont="menu" size="11"/>
-                                                            <paragraphStyle key="NSParagraphStyle" alignment="natural" lineBreakMode="wordWrapping" baseWritingDirection="natural" tighteningFactorForTruncation="0.0"/>
-                                                        </attributes>
-                                                    </fragment>
-                                                </attributedString>
-                                            </menuItem>
-                                            <menuItem title="5" id="aYj-Ub-Isd">
-                                                <attributedString key="userComments">
-                                                    <fragment content="Do not localize">
-                                                        <attributes>
-                                                            <font key="NSFont" metaFont="menu" size="11"/>
-                                                            <paragraphStyle key="NSParagraphStyle" alignment="natural" lineBreakMode="wordWrapping" baseWritingDirection="natural" tighteningFactorForTruncation="0.0"/>
-                                                        </attributes>
-                                                    </fragment>
-                                                </attributedString>
-                                            </menuItem>
-                                            <menuItem title="10" id="xjZ-nG-iOH">
-                                                <attributedString key="userComments">
-                                                    <fragment content="Do not localize">
-                                                        <attributes>
-                                                            <font key="NSFont" metaFont="menu" size="11"/>
-                                                            <paragraphStyle key="NSParagraphStyle" alignment="natural" lineBreakMode="wordWrapping" baseWritingDirection="natural" tighteningFactorForTruncation="0.0"/>
-                                                        </attributes>
-                                                    </fragment>
-                                                </attributedString>
-                                            </menuItem>
-                                            <menuItem title="15" id="5Y4-ws-cQJ">
-                                                <attributedString key="userComments">
-                                                    <fragment content="Do not localize">
-                                                        <attributes>
-                                                            <font key="NSFont" metaFont="menu" size="11"/>
-                                                            <paragraphStyle key="NSParagraphStyle" alignment="natural" lineBreakMode="wordWrapping" baseWritingDirection="natural" tighteningFactorForTruncation="0.0"/>
-                                                        </attributes>
-                                                    </fragment>
-                                                </attributedString>
-                                            </menuItem>
-                                            <menuItem title="50" id="vyo-cC-5Xv">
-                                                <attributedString key="userComments">
-                                                    <fragment content="Do not localize">
-                                                        <attributes>
-                                                            <font key="NSFont" metaFont="menu" size="11"/>
-                                                            <paragraphStyle key="NSParagraphStyle" alignment="natural" lineBreakMode="wordWrapping" baseWritingDirection="natural" tighteningFactorForTruncation="0.0"/>
-                                                        </attributes>
-                                                    </fragment>
-                                                </attributedString>
-                                            </menuItem>
-                                            <menuItem title="30" id="jbS-7v-rF4">
-                                                <attributedString key="userComments">
-                                                    <fragment content="Do not localize">
-                                                        <attributes>
-                                                            <font key="NSFont" metaFont="menu" size="11"/>
-                                                            <paragraphStyle key="NSParagraphStyle" alignment="natural" lineBreakMode="wordWrapping" baseWritingDirection="natural" tighteningFactorForTruncation="0.0"/>
-                                                        </attributes>
-                                                    </fragment>
-                                                </attributedString>
-                                            </menuItem>
+                                            <menuItem title="1" state="on" id="Byc-c2-qnN"/>
+                                            <menuItem title="2" id="ILd-2a-Vjb"/>
+                                            <menuItem title="5" id="aYj-Ub-Isd"/>
+                                            <menuItem title="10" id="xjZ-nG-iOH"/>
+                                            <menuItem title="15" id="5Y4-ws-cQJ"/>
+                                            <menuItem title="50" id="vyo-cC-5Xv"/>
+                                            <menuItem title="30" id="jbS-7v-rF4"/>
                                         </items>
                                     </menu>
                                 </popUpButtonCell>
diff --git a/Vienna/Interfaces/mul.lproj/MainMenu.xcstrings b/Vienna/Interfaces/mul.lproj/MainMenu.xcstrings
index 2c578c086a..f8df6e343f 100644
--- a/Vienna/Interfaces/mul.lproj/MainMenu.xcstrings
+++ b/Vienna/Interfaces/mul.lproj/MainMenu.xcstrings
@@ -1199,7 +1199,8 @@
             "value" : "Vienna"
           }
         }
-      }
+      },
+      "shouldTranslate" : false
     },
     "57.title" : {
       "comment" : "Class = \"NSMenu\"; title = \"Vienna\"; ObjectID = \"57\";",
@@ -1211,7 +1212,8 @@
             "value" : "Vienna"
           }
         }
-      }
+      },
+      "shouldTranslate" : false
     },
     "58.title" : {
       "comment" : "Class = \"NSMenuItem\"; title = \"About Vienna\"; ObjectID = \"58\";",
diff --git a/Vienna/Interfaces/mul.lproj/MainWindowController.xcstrings b/Vienna/Interfaces/mul.lproj/MainWindowController.xcstrings
index 3d4cc3a864..da6ba36d31 100644
--- a/Vienna/Interfaces/mul.lproj/MainWindowController.xcstrings
+++ b/Vienna/Interfaces/mul.lproj/MainWindowController.xcstrings
@@ -1295,7 +1295,8 @@
             "value" : "Vienna"
           }
         }
-      }
+      },
+      "shouldTranslate" : false
     },
     "676-5a-TdF.title" : {
       "comment" : "Class = \"NSMenuItem\"; title = \"Open Subscription Home Page\"; ObjectID = \"676-5a-TdF\";",
@@ -7253,7 +7254,8 @@
             "value" : "Folder Name"
           }
         }
-      }
+      },
+      "shouldTranslate" : false
     },
     "RSJ-ph-xG6.title" : {
       "comment" : "Class = \"NSButtonCell\"; title = \"0\"; ObjectID = \"RSJ-ph-xG6\";",
@@ -7265,7 +7267,8 @@
             "value" : "0"
           }
         }
-      }
+      },
+      "shouldTranslate" : false
     },
     "sDP-Ni-g3a.title" : {
       "comment" : "Class = \"NSMenuItem\"; title = \"Unread Articles\"; ObjectID = \"sDP-Ni-g3a\";",
diff --git a/Vienna/Interfaces/mul.lproj/Preferences.xcstrings b/Vienna/Interfaces/mul.lproj/Preferences.xcstrings
index 73f980d1e2..d0b15d0aea 100644
--- a/Vienna/Interfaces/mul.lproj/Preferences.xcstrings
+++ b/Vienna/Interfaces/mul.lproj/Preferences.xcstrings
@@ -434,7 +434,7 @@
       }
     },
     "5Y4-ws-cQJ.title" : {
-      "comment" : "Class = \"NSMenuItem\"; title = \"15\"; ObjectID = \"5Y4-ws-cQJ\"; Note = \"Do not localize\";",
+      "comment" : "Class = \"NSMenuItem\"; title = \"15\"; ObjectID = \"5Y4-ws-cQJ\";",
       "extractionState" : "extracted_with_value",
       "localizations" : {
         "en" : {
@@ -443,7 +443,8 @@
             "value" : "15"
           }
         }
-      }
+      },
+      "shouldTranslate" : false
     },
     "6GF-Pk-gI9.title" : {
       "comment" : "Class = \"NSMenuItem\"; title = \"Every 6 hours\"; ObjectID = \"6GF-Pk-gI9\";",
@@ -1232,7 +1233,7 @@
       }
     },
     "aYj-Ub-Isd.title" : {
-      "comment" : "Class = \"NSMenuItem\"; title = \"5\"; ObjectID = \"aYj-Ub-Isd\"; Note = \"Do not localize\";",
+      "comment" : "Class = \"NSMenuItem\"; title = \"5\"; ObjectID = \"aYj-Ub-Isd\";",
       "extractionState" : "extracted_with_value",
       "localizations" : {
         "en" : {
@@ -1241,7 +1242,8 @@
             "value" : "5"
           }
         }
-      }
+      },
+      "shouldTranslate" : false
     },
     "bom-nB-4zx.title" : {
       "comment" : "Class = \"NSTextFieldCell\"; title = \"Move articles to Trash:\"; ObjectID = \"bom-nB-4zx\";",
@@ -1490,7 +1492,7 @@
       }
     },
     "Byc-c2-qnN.title" : {
-      "comment" : "Class = \"NSMenuItem\"; title = \"1\"; ObjectID = \"Byc-c2-qnN\"; Note = \"Do not localize\";",
+      "comment" : "Class = \"NSMenuItem\"; title = \"1\"; ObjectID = \"Byc-c2-qnN\";",
       "extractionState" : "extracted_with_value",
       "localizations" : {
         "en" : {
@@ -1499,7 +1501,8 @@
             "value" : "1"
           }
         }
-      }
+      },
+      "shouldTranslate" : false
     },
     "c4l-M5-qB1.title" : {
       "comment" : "Class = \"NSMenuItem\"; title = \"After one day\"; ObjectID = \"c4l-M5-qB1\";",
@@ -3464,7 +3467,7 @@
       }
     },
     "ILd-2a-Vjb.title" : {
-      "comment" : "Class = \"NSMenuItem\"; title = \"2\"; ObjectID = \"ILd-2a-Vjb\"; Note = \"Do not localize\";",
+      "comment" : "Class = \"NSMenuItem\"; title = \"2\"; ObjectID = \"ILd-2a-Vjb\";",
       "extractionState" : "extracted_with_value",
       "localizations" : {
         "en" : {
@@ -3473,7 +3476,8 @@
             "value" : "2"
           }
         }
-      }
+      },
+      "shouldTranslate" : false
     },
     "ITA-U9-lhX.title" : {
       "comment" : "Class = \"NSTextFieldCell\"; title = \"Article list font:\"; ObjectID = \"ITA-U9-lhX\";",
@@ -3602,7 +3606,7 @@
       }
     },
     "jbS-7v-rF4.title" : {
-      "comment" : "Class = \"NSMenuItem\"; title = \"30\"; ObjectID = \"jbS-7v-rF4\"; Note = \"Do not localize\";",
+      "comment" : "Class = \"NSMenuItem\"; title = \"30\"; ObjectID = \"jbS-7v-rF4\";",
       "extractionState" : "extracted_with_value",
       "localizations" : {
         "en" : {
@@ -3611,7 +3615,8 @@
             "value" : "30"
           }
         }
-      }
+      },
+      "shouldTranslate" : false
     },
     "jfH-Hq-gRk.title" : {
       "comment" : "Class = \"NSButtonCell\"; title = \"Bounce the application icon\"; ObjectID = \"jfH-Hq-gRk\";",
@@ -6344,7 +6349,7 @@
       }
     },
     "vyo-cC-5Xv.title" : {
-      "comment" : "Class = \"NSMenuItem\"; title = \"50\"; ObjectID = \"vyo-cC-5Xv\"; Note = \"Do not localize\";",
+      "comment" : "Class = \"NSMenuItem\"; title = \"50\"; ObjectID = \"vyo-cC-5Xv\";",
       "extractionState" : "extracted_with_value",
       "localizations" : {
         "en" : {
@@ -6353,7 +6358,8 @@
             "value" : "50"
           }
         }
-      }
+      },
+      "shouldTranslate" : false
     },
     "wyk-W1-xMh.title" : {
       "comment" : "Class = \"NSViewController\"; title = \"Updates\"; ObjectID = \"wyk-W1-xMh\";",
@@ -6614,7 +6620,7 @@
       }
     },
     "xjZ-nG-iOH.title" : {
-      "comment" : "Class = \"NSMenuItem\"; title = \"10\"; ObjectID = \"xjZ-nG-iOH\"; Note = \"Do not localize\";",
+      "comment" : "Class = \"NSMenuItem\"; title = \"10\"; ObjectID = \"xjZ-nG-iOH\";",
       "extractionState" : "extracted_with_value",
       "localizations" : {
         "en" : {
@@ -6623,7 +6629,8 @@
             "value" : "10"
           }
         }
-      }
+      },
+      "shouldTranslate" : false
     },
     "YG6-9k-gKH.title" : {
       "comment" : "Class = \"NSTextFieldCell\"; title = \"URL:\"; ObjectID = \"YG6-9k-gKH\";",
diff --git a/Vienna/Resources/InfoPlist.xcstrings b/Vienna/Resources/InfoPlist.xcstrings
index f660af4351..8d8a7fc9a3 100644
--- a/Vienna/Resources/InfoPlist.xcstrings
+++ b/Vienna/Resources/InfoPlist.xcstrings
@@ -11,7 +11,8 @@
             "value" : "Vienna"
           }
         }
-      }
+      },
+      "shouldTranslate" : false
     },
     "NSAppleEventsUsageDescription" : {
       "comment" : "A message that tells the user why Vienna is requesting the ability to send Apple events.",
@@ -22,7 +23,8 @@
             "value" : ""
           }
         }
-      }
+      },
+      "shouldTranslate" : false
     },
     "NSHumanReadableCopyright" : {
       "comment" : "Copyright (human-readable)",
@@ -34,7 +36,8 @@
             "value" : "© 2004–2024 The Vienna RSS Project"
           }
         }
-      }
+      },
+      "shouldTranslate" : false
     },
     "OPML document" : {
       "comment" : "A label for OPML (Outline Processor Markup Language) documents. This is shown in Finder's Get Info window, for example.",
diff --git a/Vienna/Resources/Localizable.xcstrings b/Vienna/Resources/Localizable.xcstrings
index 518327d89e..63ec917a07 100644
--- a/Vienna/Resources/Localizable.xcstrings
+++ b/Vienna/Resources/Localizable.xcstrings
@@ -661,7 +661,8 @@
             "value" : "%1$@, %2$@"
           }
         }
-      }
+      },
+      "shouldTranslate" : false
     },
     "%d new articles retrieved" : {
       "localizations" : {
@@ -8352,9 +8353,6 @@
         }
       }
     },
-    "Development Options" : {
-      "comment" : "Do not localize"
-    },
     "Do not show this warning again" : {
       "comment" : "Title of a checkbox on an alert",
       "localizations" : {
@@ -13815,12 +13813,6 @@
         }
       }
     },
-    "Log Formatting Strings" : {
-      "comment" : "Do not localize"
-    },
-    "Log Predicate String" : {
-      "comment" : "Do not localize"
-    },
     "Make sure the username and password needed to access the Open Reader server are correctly set in Vienna's preferences. Also check your network access." : {
       "localizations" : {
         "da" : {
diff --git a/Vienna/Sources/Alerts/SmartFolder.m b/Vienna/Sources/Alerts/SmartFolder.m
index 8653ceba5b..4720289977 100644
--- a/Vienna/Sources/Alerts/SmartFolder.m
+++ b/Vienna/Sources/Alerts/SmartFolder.m
@@ -337,14 +337,18 @@ - (void)prepareDevelopmentOptionsButton
 {
     NSPopUpButton *button = [[NSPopUpButton alloc] initWithFrame:NSZeroRect
                                                        pullsDown:YES];
-    [button addItemWithTitle:NSLocalizedString(@"Development Options",
-                                               @"Do not localize")];
-    [button.menu addItemWithTitle:NSLocalizedString(@"Log Predicate String",
-                                                    @"Do not localize")
+    NSBundle *mainBundle = NSBundle.mainBundle;
+    [button addItemWithTitle:[mainBundle localizedStringForKey:@"Development Options"
+                                                         value:nil
+                                                         table:nil]];
+    [button.menu addItemWithTitle:[mainBundle localizedStringForKey:@"Log Predicate String"
+                                                              value:nil
+                                                              table:nil]
                            action:@selector(logPredicateString)
                     keyEquivalent:@""];
-    [button.menu addItemWithTitle:NSLocalizedString(@"Log Formatting Strings",
-                                                    @"Do not localize")
+    [button.menu addItemWithTitle:[mainBundle localizedStringForKey:@"Log Formatting Strings"
+                                                              value:nil
+                                                              table:nil]
                            action:@selector(logFormattingStrings)
                     keyEquivalent:@""];
     button.translatesAutoresizingMaskIntoConstraints = NO;