Make monitor detection reuse the port name translation
authorJulien "_FrnchFrgg_" RIVAUD <frnchfrgg@free.fr>
Fri, 29 Jul 2016 18:49:54 +0000 (20:49 +0200)
committerJulien "_FrnchFrgg_" RIVAUD <frnchfrgg@free.fr>
Fri, 29 Jul 2016 20:10:49 +0000 (22:10 +0200)
So that they never get out of sync, and translators don't get confused.

Also replace some N_() where X_() was really intended.

gtk2_ardour/port_group.cc

index 084514363a3bd90ff0d5af2b51f5fb66be9fa942..093e307f9c8db4ab91c8ba6b352af987c0626583 100644 (file)
@@ -549,10 +549,11 @@ PortGroupList::gather (ARDOUR::Session* session, ARDOUR::DataType type, bool inp
                                    we excluded them earlier.
                                 */
 
-                                string lp = p;
+                                string lp = p, monitor = _("Monitor");
                                 boost::to_lower (lp);
+                                boost::to_lower (monitor);
 
-                                if ((lp.find (N_(":monitor")) != string::npos) &&
+                                if ((lp.find (monitor) != string::npos) &&
                                     (lp.find (lpn) != string::npos)) {
                                         ++s;
                                         continue;
@@ -568,9 +569,9 @@ PortGroupList::gather (ARDOUR::Session* session, ARDOUR::DataType type, bool inp
                                if (ph) {
                                        DataType t (AudioEngine::instance()->port_engine().port_data_type (ph));
                                        if (t != DataType::NIL) {
-                                               if (port_has_prefix (p, N_("system:")) ||
-                                                   port_has_prefix (p, N_("alsa_pcm:")) ||
-                                                   port_has_prefix (p, N_("alsa_midi:"))) {
+                                               if (port_has_prefix (p, X_("system:")) ||
+                                                   port_has_prefix (p, X_("alsa_pcm:")) ||
+                                                   port_has_prefix (p, X_("alsa_midi:"))) {
                                                        extra_system[t].push_back (p);
                                                } else if (port_has_prefix (p, lpnc)) {
                                                        /* Hide scene ports from non-Tracks Live builds */