Stazed / non-mixer-xt

Reboot of Non Mixer with eXTended LV2 support, CLAP, VST(2) and VST3 support.
GNU General Public License v2.0
27 stars 6 forks source link

Problem with translations in plugin parameters #29

Open Houston4444 opened 8 months ago

Houston4444 commented 8 months ago

If a plugin has translations, parameters names are displayed strangely, here there is an example with Noise Repellent (Répulseur de bruit in french).

Note that the plugin name in the signal chain is also affected.

Screenshot_20240314_085552

here is the contents of the .ttl file :

@prefix doap: <http://usefulinc.com/ns/doap#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix lv2: <http://lv2plug.in/ns/lv2core#> .
@prefix param: <http://lv2plug.in/ns/ext/parameters#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix pg: <http://lv2plug.in/ns/ext/port-groups#> .
@prefix pprop: <http://lv2plug.in/ns/ext/port-props#> .
@prefix units: <http://lv2plug.in/ns/extensions/units#> .
@prefix state: <http://lv2plug.in/ns/ext/state#> .
@prefix urid: <http://lv2plug.in/ns/ext/urid#> .

<https://github.com/lucianodato#me>
  a foaf:Person ;
  foaf:name "Luciano Dato" ;
  foaf:homepage <https://github.com/lucianodato> ;
  foaf:mbox <mailto:lucianodato@gmail.com> .

<https://github.com/lucianodato/noise-repellent>
  a lv2:Plugin, lv2:SpectralPlugin, lv2:UtilityPlugin, doap:Project ;
  doap:maintainer <https://github.com/lucianodato#me> ;
  doap:license <https://opensource.org/licenses/LGPL-3.0> ;
  doap:name "Repelente de ruido"@es ,
    "Répulseur de bruit"@fr ,
    "Noise repellent" ;
  doap:shortdesc "Un plugin LV2 para la reduccion de ruido"@es ,
               "Un plugin LV2 pour la réduction du bruit à large bande"@fr ,
               "An LV2 plugin for broadband noise reduction" ;
  lv2:project <https://github.com/lucianodato/noise-repellent> ;
  lv2:optionalFeature lv2:isLive, lv2:hardRTCapable ;
  lv2:extensionData state:interface ;
  lv2:requiredFeature urid:map ;

  lv2:minorVersion 2 ;
  lv2:microVersion 0 ;

  lv2:port [
    a lv2:ControlPort,
      lv2:InputPort ;
    lv2:index 0 ;
    lv2:symbol "reduction" ;
    lv2:name "Cantidad de reduccion"@es ,
      "Quantité de réduction"@fr ,
      "Reduction amount" ;
    lv2:minimum 0.0 ;
    lv2:maximum 48.0 ;
    lv2:default 10.0 ;
    units:unit units:db ;
    pg:group <https://github.com/lucianodato/noise-repellent#main_controls> ;
  ], [
    a lv2:ControlPort,
      lv2:InputPort ;
    lv2:index 1 ;
    lv2:symbol "offset" ;
    lv2:name "Compensacion de umbrales"@es ,
      "Décalage des seuils"@fr ,
      "Thresholds offset" ;
    lv2:minimum -12.0 ;
    lv2:maximum 12.0 ;
    lv2:default 0.0 ;
    units:unit units:db ;
    pg:group <https://github.com/lucianodato/noise-repellent#main_controls> ;
  ], [
    a lv2:ControlPort,
      lv2:InputPort ;
    lv2:index 2 ;
    lv2:symbol "release" ;
    lv2:name "Relevo"@es ,
      "Relâchement"@fr ,
      "Release" ;
    lv2:minimum 0.0 ;
    lv2:maximum 1000.0 ;
    lv2:default 150.0 ;
    units:unit units:ms ;
    pg:group <https://github.com/lucianodato/noise-repellent#main_controls> ;
  ], [
    a lv2:ControlPort,
      lv2:InputPort ;
    lv2:index 3 ;
    lv2:symbol "masking" ;
    lv2:name "Enmascaramiento"@es,
      "Masquage"@fr ,
      "Masking" ;
    lv2:minimum 1.0 ;
    lv2:maximum 10.0 ;
    lv2:default 5.0 ;
    pg:group <https://github.com/lucianodato/noise-repellent#main_controls> ;
  ], [
    a lv2:InputPort,
    lv2:ControlPort ;
    lv2:index 4 ;
    lv2:symbol "transient_protection" ;
    lv2:name "Proteger transientes"@es ,
      "Protéger les transitoires"@fr ,
      "Protect Transients" ;
    lv2:default 1.0 ;
    lv2:minimum 1.0 ;
    lv2:maximum 6.0 ;
    pg:group <https://github.com/lucianodato/noise-repellent#main_controls> ;
  ], [
    a lv2:ControlPort,
      lv2:InputPort ;
    lv2:index 5 ;
    lv2:symbol "whitening" ;
    lv2:name "Blanqueo de residuo"@es ,
      "Blanchissement du bruit"@fr ,
      "Residual whitening" ;
    lv2:minimum 0.0 ;
    lv2:maximum 100.0 ;
    lv2:default 0.0 ;
    units:unit units:pc ;
    pg:group <https://github.com/lucianodato/noise-repellent#main_controls> ;
  ], [
    a lv2:ControlPort,
      lv2:InputPort ;
    lv2:index 6 ;
    lv2:symbol "noise_learn" ;
    lv2:name "Aprender perfil de ruido"@es ,
      "Apprendre le profil du bruit"@fr , 
      "Learn noise profile" ;
    lv2:minimum 0 ;
    lv2:maximum 1 ;
    lv2:default 0 ;
    lv2:portProperty lv2:toggled, lv2:integer ;
    pg:group <https://github.com/lucianodato/noise-repellent#switches> ;
  ], [
    a lv2:ControlPort,
      lv2:InputPort ;
    lv2:index 7 ;
    lv2:symbol "adaptive_noise_learn" ;
    lv2:name "Adaptar perfil de ruido"@es ,
      "Apprentissage adaptatif du bruit"@fr ,
      "Adaptive noise learn" ;
    lv2:minimum 0 ;
    lv2:maximum 1 ;
    lv2:default 0 ;
    lv2:portProperty lv2:toggled, lv2:integer ;
    pg:group <https://github.com/lucianodato/noise-repellent#switches> ;
  ], [
    a lv2:InputPort,
    lv2:ControlPort ;
    lv2:index 8 ;
    lv2:symbol "reset_noise_profile" ;
    lv2:name "Reiniciar perfil de ruido"@es ,
      "Réinitialiser le profil de bruit"@fr ,
      "Reset noise profile" ;
    lv2:default 0 ;
    lv2:minimum 0 ;
    lv2:maximum 1 ;
    lv2:portProperty lv2:integer, lv2:toggled, pprop:trigger ;
    pg:group <https://github.com/lucianodato/noise-repellent#switches> ;
  ], [
    a lv2:InputPort,
    lv2:ControlPort ;
    lv2:index 9 ;
    lv2:symbol "Residual_listen" ;
    lv2:name "Escuchar Residuo"@es ,
      "Écoute résiduelle"@fr ,
      "Residual listen" ;
    lv2:default 0 ;
    lv2:minimum 0 ;
    lv2:maximum 1 ;
    lv2:portProperty lv2:toggled, lv2:integer ;
    pg:group <https://github.com/lucianodato/noise-repellent#switches> ;
  ], [
    a lv2:InputPort, lv2:ControlPort ;
    lv2:index 10 ;
    lv2:name "Enable" ;
    lv2:symbol "enable" ;
    lv2:default 1.0 ;
    lv2:minimum 0.0 ;
    lv2:maximum 1.0 ;
    lv2:portProperty lv2:toggled, pprop:notOnGUI;
    lv2:designation <http://ardour.org/lv2/processing#enable>;
    pg:group <https://github.com/lucianodato/noise-repellent#switches> ;
  ], [
    a lv2:OutputPort,
      lv2:ControlPort ;
    lv2:name "latency" ;
    lv2:index 11 ;
    lv2:symbol "latency" ;
    lv2:minimum 0 ;
    lv2:maximum 8192 ;
    lv2:portProperty lv2:reportsLatency, lv2:integer, pprop:notOnGUI ;
    units:unit units:frame ;
    pg:group <https://github.com/lucianodato/noise-repellent#latency> ;
  ], [
    a lv2:AudioPort,
      lv2:InputPort ;
    lv2:index 12 ;
    lv2:symbol "input" ;
    lv2:name "Input" ;
    pg:group <https://github.com/lucianodato/noise-repellent#inputs> ;
  ], [
    a lv2:AudioPort,
      lv2:OutputPort ;
    lv2:index 13 ;
    lv2:symbol "output" ;
    lv2:name "Output" ;
    pg:group <https://github.com/lucianodato/noise-repellent#outputs> ;
  ];
  rdfs:comment "Un plugin LV2 para la reduccion de ruido"@es,
               "Un plugin LV2 pour la réduction du bruit à large bande"@fr,
               "An LV2 plugin for broadband noise reduction" ;
.

Note that strings without accents are also affected.

Here is another example with Plujain Ramp:

Screenshot_20240314_090258

the .ttl file contents:

@prefix atom: <http://lv2plug.in/ns/ext/atom#>.
@prefix lv2:  <http://lv2plug.in/ns/lv2core#>.
@prefix doap: <http://usefulinc.com/ns/doap#>.
@prefix epp: <http://lv2plug.in/ns/ext/port-props#>.
@prefix foaf: <http://xmlns.com/foaf/0.1/>.
@prefix midi:  <http://lv2plug.in/ns/ext/midi#> .
@prefix mod: <http://moddevices.com/ns/modgui#>.
@prefix pprop: <http://lv2plug.in/ns/ext/port-props#>.
@prefix rdf:  <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix time:  <http://lv2plug.in/ns/ext/time#>.
@prefix units: <http://lv2plug.in/ns/extensions/units#>.
@prefix ue: <http://lv2plug.in/ns/extensions/units#> .

<http://plujain/plugins/ramp>
a lv2:Plugin, lv2:ModulatorPlugin;

doap:name "Plujain-Ramp";

doap:developer [
    foaf:name "Houston4444";
    foaf:homepage <>;
    foaf:mbox <mailto:4444houston@gmail.com>;
    ];

doap:maintainer [
    foaf:name "Houston4444";
    foaf:homepage <>;
    foaf:mbox <mailto:4444houston@gmail.com>;
    ];

    lv2:minorVersion 1;
    lv2:microVersion 3;

doap:license <GPL>;

rdfs:comment """
mono ramp tremolo

""";

lv2:port
[
    a lv2:AudioPort, lv2:InputPort;
    lv2:index 0;
    lv2:symbol "In";
    lv2:name "In";
],
[
    a atom:AtomPort, lv2:InputPort;
    atom:bufferType atom:Sequence;
    atom:supports time:Position;
    lv2:index 1;
    lv2:symbol "ctrl_in";
    lv2:name "Ctrl In";
],
[
    a lv2:AudioPort, lv2:OutputPort;
    lv2:index 2;
    lv2:symbol "Out";
    lv2:name "Out";
],
[
    a lv2:InputPort, lv2:ControlPort ;
    lv2:index 3;
    lv2:symbol "on" ;
    lv2:name "Active",
        "Actif"@fr ;
    lv2:default 1 ;
    lv2:minimum 0 ;
    lv2:maximum 1 ;
    lv2:portProperty lv2:integer ;
    lv2:portProperty lv2:toggled ;
    lv2:designation lv2:enabled ;
],
[
    a lv2:InputPort, lv2:ControlPort ;
    lv2:index 4 ;
    lv2:symbol "pre_start" ;
    lv2:name "Pre Start",
        "Pré-démarrage"@fr;
    lv2:default 0 ;
    lv2:minimum 0 ;
    lv2:maximum 32 ;
    lv2:portProperty lv2:integer ;
],
[
    a lv2:ControlPort, lv2:InputPort;
    lv2:index 5;
    lv2:symbol "pre_start_units";
    lv2:name "Pre Start Units",
        "Unités du pré-démarrage"@fr ;
    lv2:portProperty lv2:integer;
    lv2:portProperty lv2:enumeration ;
        lv2:scalePoint [rdfs:label "beat"; rdf:value 1];
        lv2:scalePoint [rdfs:label "beat/2"; rdf:value 2];
        lv2:scalePoint [rdfs:label "beat/3"; rdf:value 3];
        lv2:scalePoint [rdfs:label "beat/4"; rdf:value 4];
        lv2:scalePoint [rdfs:label "beat/6"; rdf:value 6];
        lv2:scalePoint [rdfs:label "beat/8"; rdf:value 8];
    lv2:default 2;
    lv2:minimum 1;
    lv2:maximum 8;
],
[
    a lv2:ControlPort, lv2:InputPort;
    lv2:index 6;
    lv2:symbol "beat_offset";
    lv2:name "Beat Offset",
        "Placement"@fr ;
    lv2:default 0;
    lv2:minimum -1;
    lv2:maximum 1;
],
[
    a lv2:InputPort ;
    a lv2:ControlPort ;
    lv2:index 7;
    lv2:symbol "bpm_host" ;
    lv2:name "Host BPM" ;
    lv2:portProperty epp:hasStrictBounds ;
    lv2:default 120 ;
    lv2:minimum 1 ;
    lv2:maximum 300 ;
    ue:unit ue:bpm ;
    lv2:portProperty pprop:notOnGUI ;
    lv2:designation <http://lv2plug.in/ns/ext/time#beatsPerMinute> ;
],
[
    a lv2:ControlPort, lv2:InputPort;
    lv2:index 8;
    lv2:symbol "division";
    lv2:name "Division",
        "Division"@fr ;
    lv2:portProperty lv2:integer;
    lv2:portProperty lv2:enumeration ;
        lv2:scalePoint [rdfs:label "8beats"; rdf:value 0];
        lv2:scalePoint [rdfs:label "7beats"; rdf:value 1];
        lv2:scalePoint [rdfs:label "6beats"; rdf:value 2];
        lv2:scalePoint [rdfs:label "5beats"; rdf:value 3];
        lv2:scalePoint [rdfs:label "4beats"; rdf:value 4];
        lv2:scalePoint [rdfs:label "3beats"; rdf:value 5];
        lv2:scalePoint [rdfs:label "2beats"; rdf:value 6];
        lv2:scalePoint [rdfs:label "beat";   rdf:value 7];
        lv2:scalePoint [rdfs:label "beat/2"; rdf:value 8];
        lv2:scalePoint [rdfs:label "beat/2 t"; rdf:value 9];
        lv2:scalePoint [rdfs:label "beat/3"; rdf:value 10];
        lv2:scalePoint [rdfs:label "beat/4"; rdf:value 11];
        lv2:scalePoint [rdfs:label "beat/4 t"; rdf:value 12];
        lv2:scalePoint [rdfs:label "beat/6"; rdf:value 13];
        lv2:scalePoint [rdfs:label "beat/8"; rdf:value 14];
    lv2:default 11;
    lv2:minimum 0;
    lv2:maximum 14;
],
[
    a lv2:ControlPort, lv2:InputPort;
    lv2:index 9;
    lv2:symbol "max_duration";
    lv2:name "Max Duration",
        "Durée maximale"@fr ;
        lv2:scalePoint [rdfs:label "beat/32"; rdf:value 0.03125];
        lv2:scalePoint [rdfs:label "beat/16"; rdf:value 0.0625];
        lv2:scalePoint [rdfs:label "beat/8"; rdf:value 0.125];
#         lv2:scalePoint [rdfs:label "beat/6"; rdf:value 0.1667];
        lv2:scalePoint [rdfs:label "beat/4"; rdf:value 0.25];
#         lv2:scalePoint [rdfs:label "beat/3"; rdf:value 0.3333];
        lv2:scalePoint [rdfs:label "beat/2"; rdf:value 0.5];
    lv2:default 8;
    lv2:minimum 0.0315;
    lv2:maximum 8;
    units:unit units:beat ;
    lv2:portProperty pprop:logarithmic ;
],
[
    a lv2:InputPort, lv2:ControlPort ;
    lv2:index 10;
    lv2:symbol "half_speed" ;
    lv2:name "Half Speed",
        "Demi vitesse"@fr ;
    lv2:default 0 ;
    lv2:minimum 0 ;
    lv2:maximum 1 ;
    lv2:portProperty lv2:integer ;
    lv2:portProperty lv2:toggled ;
],
[
    a lv2:InputPort, lv2:ControlPort ;
    lv2:index 11;
    lv2:symbol "double_speed";
    lv2:name "Double Speed",
        "Double vitesse"@fr ;
    lv2:default 0 ;
    lv2:minimum 0 ;
    lv2:maximum 1 ;
    lv2:portProperty lv2:integer ;
    lv2:portProperty lv2:toggled ;
],

[
    a lv2:ControlPort, lv2:InputPort;
    lv2:index 12;
    lv2:symbol "attack";
    lv2:name "Attack",
        "Attaque"@fr ;
    lv2:default 5;
    lv2:minimum 0.5;
    lv2:maximum 200;
    units:unit units:ms ;
],
[
    a lv2:ControlPort, lv2:InputPort;
    lv2:index 13;
    lv2:symbol "shape";
    lv2:name "Shape",
        "Forme"@fr ;
    lv2:default 0;
    lv2:minimum -4;
    lv2:maximum 4;
],
[
    a lv2:ControlPort, lv2:InputPort;
    lv2:index 14;
    lv2:symbol "depth";
    lv2:name "Depth",
        "Profondeur"@fr ;
    lv2:default 1;
    lv2:minimum 0;
    lv2:maximum 1;
],
[
    a lv2:ControlPort, lv2:InputPort;
    lv2:index 15;
    lv2:symbol "volume";
    lv2:name "Volume",
        "Volume"@fr ;
    units:unit units:db ;
    lv2:scalePoint [rdfs:label "Mute"; rdf:value -80];
    lv2:default 0;
    lv2:minimum -80;
    lv2:maximum 12;
],
[
    a lv2:ControlPort, lv2:InputPort;
    lv2:index 16;
    lv2:symbol "speed_effect_1";
    lv2:name "Speed Effect 1",
        "Effet de vitesse 1"@fr ;
    lv2:portProperty lv2:enumeration ;
        lv2:scalePoint [rdfs:label "Octave ++ reverse"; rdf:value -4];
        lv2:scalePoint [rdfs:label "Octave + Fifth reverse"; rdf:value -3.0];
        lv2:scalePoint [rdfs:label "Octave + reverse"; rdf:value -2];
        lv2:scalePoint [rdfs:label "Fifth reverse"; rdf:value -1.5];
        lv2:scalePoint [rdfs:label "Reverse"; rdf:value -1];
        lv2:scalePoint [rdfs:label "Octave - reverse"; rdf:value -0.5];
        lv2:scalePoint [rdfs:label "Octave -- reverse"; rdf:value -0.25];
        lv2:scalePoint [rdfs:label "Octave --"; rdf:value 0.25];
        lv2:scalePoint [rdfs:label "Octave -"; rdf:value 0.5];
        lv2:scalePoint [rdfs:label "Fifth -"; rdf:value 0.75];
        lv2:scalePoint [rdfs:label "Fifth +"; rdf:value 1.5];
        lv2:scalePoint [rdfs:label "Octave +"; rdf:value 2];
        lv2:scalePoint [rdfs:label "Octave + Fifth"; rdf:value 3];
        lv2:scalePoint [rdfs:label "Octave ++"; rdf:value 4];
    lv2:default 0.5;
    lv2:minimum -4;
    lv2:maximum 4;
],
[
    a lv2:ControlPort, lv2:InputPort;
    lv2:index 17;
    lv2:symbol "speed_effect_1_vol";
    lv2:name "Speed Effect 1 Volume",
        "Volume de l'effet de vitesse 1"@fr ;
    units:unit units:db ;
    lv2:scalePoint [rdfs:label "Mute"; rdf:value -80];
    lv2:default -80;
    lv2:minimum -80;
    lv2:maximum 12;
],
[
    a lv2:ControlPort, lv2:InputPort;
    lv2:index 18;
    lv2:symbol "speed_effect_2";
    lv2:name "Speed Effect 2",
        "Effet de vitesse 2"@fr;
    lv2:portProperty lv2:enumeration ;
        lv2:scalePoint [rdfs:label "Octave ++ reverse"; rdf:value -4];
        lv2:scalePoint [rdfs:label "Octave + Fifth reverse"; rdf:value -3.0];
        lv2:scalePoint [rdfs:label "Octave + reverse"; rdf:value -2];
        lv2:scalePoint [rdfs:label "Fifth reverse"; rdf:value -1.5];
        lv2:scalePoint [rdfs:label "Reverse"; rdf:value -1];
        lv2:scalePoint [rdfs:label "Octave - reverse"; rdf:value -0.5];
        lv2:scalePoint [rdfs:label "Octave -- reverse"; rdf:value -0.25];
        lv2:scalePoint [rdfs:label "Octave --"; rdf:value 0.25];
        lv2:scalePoint [rdfs:label "Octave -"; rdf:value 0.5];
        lv2:scalePoint [rdfs:label "Fifth -"; rdf:value 0.75];
        lv2:scalePoint [rdfs:label "Fifth +"; rdf:value 1.5];
        lv2:scalePoint [rdfs:label "Octave +"; rdf:value 2];
        lv2:scalePoint [rdfs:label "Octave + Fifth"; rdf:value 3];
        lv2:scalePoint [rdfs:label "Octave ++"; rdf:value 4];
    lv2:default 2;
    lv2:minimum -4;
    lv2:maximum 4;
],
[
    a lv2:ControlPort, lv2:InputPort;
    lv2:index 19;
    lv2:symbol "speed_effect_2_vol";
    lv2:name "Speed Effect 2 Volume",
        "Volume de l'effet de vitesse 2"@fr;
    units:unit units:db ;
    lv2:scalePoint [rdfs:label "Mute"; rdf:value -80];
    lv2:default -80;
    lv2:minimum -80;
    lv2:maximum 12;
].

For Division and Volume, the only thing I see for them to be displayed correctly, is that it's exactly the same string than in english.

Stazed commented 8 months ago

I have never done any internationalization and I am not sure that NTK supports it. But I will have to re-write the generic UI anyway, so I will have a look then.

Stazed commented 8 months ago

After hours of searching, it seems that FLTK added internationalization with version 1.3 which is what NTK is based on. So it may be supported by NTK. But I cannot find anything useful about how things are supposed to work. If there are any working examples of FLTK/NTK using internationalization with actual code examples, it would be really helpful.

If anyone out there can point me to a working code example, this might get done, if not, then probably not by me...

Houston4444 commented 8 months ago

Thanks for the search !

Waiting for translation solution, it would be good to just disable translation. I fix it starting non-mixer-xt with environment variable LANG=C.