"in" and "out" as part of a port name should not be translatable by default, since...
authorPaul Davis <paul@linuxaudiosystems.com>
Sat, 8 Aug 2009 22:47:21 +0000 (22:47 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Sat, 8 Aug 2009 22:47:21 +0000 (22:47 +0000)
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@5499 d708f5d6-7413-0410-9779-e7cbd77b26cf

libs/ardour/io.cc

index 6b0b08363d377704acde62317b0a1a6f23a9b51c..ef9c6f62152271c9fada1c979fa780a77b5a18cc 100644 (file)
@@ -2721,11 +2721,25 @@ IO::build_legal_port_name (bool in)
        char* suffix;
        int maxports;
 
+       /* note that if "in" or "out" are translated it will break a session
+          across locale switches because a port's connection list will
+          show (old) translated names, but the current port name will
+          use the (new) translated name.
+       */
+
        if (in) {
-               suffix = _("in");
+               if (getenv ("ARDOUR_RETAIN_PORT_NAME_SUFFIX_TRANSLATION") != 0) {
+                       suffix = _("in");
+               } else {
+                       suffix = X_("in");
+               }
                maxports = _input_maximum;
        } else {
-               suffix = _("out");
+               if (getenv ("ARDOUR_RETAIN_PORT_NAME_SUFFIX_TRANSLATION") != 0) {
+                       suffix = _("out");
+               } else {
+                       suffix = X_("out");
+               }
                maxports = _output_maximum;
        }