[vlc-commits] [Git][videolan/vlc][master] 14 commits: opengl: fix missing option text translation

Rémi Denis-Courmont (@Courmisch) gitlab at videolan.org
Sat Jan 29 08:24:12 UTC 2022



Rémi Denis-Courmont pushed to branch master at VideoLAN / VLC


Commits:
a78a2caa by Lyndon Brown at 2022-01-29T07:56:05+00:00
opengl: fix missing option text translation

took the opportunity to change "opengl" to "OpenGL" since that is more
appropriate for how it is used in interfaces, and to use defines as
commonly done for cleanliness.

- - - - -
fd455042 by Lyndon Brown at 2022-01-29T07:56:05+00:00
core: add missing translation for --extractor-flatten label

and move to define like the rest.

- - - - -
31d99aab by Lyndon Brown at 2022-01-29T07:56:05+00:00
amt: remove translation of default FQDN

- - - - -
e4bcdf98 by Lyndon Brown at 2022-01-29T07:56:05+00:00
core: translate deinterlace choice labels

- - - - -
70c518c3 by Lyndon Brown at 2022-01-29T07:56:05+00:00
extract: translate option choice labels

- - - - -
ea90f6a8 by Lyndon Brown at 2022-01-29T07:56:05+00:00
declink: fix issue with option choice labels

the integer mapping should not appear like this in these labels. it just
creates a mess. it is the job of the CLI interface to show the values
besides this text such as to give users this mapping. in GUIs showing
users this mapping is completely unwanted.

these now happen to be identical to those in sdiout and thus consistent
and would reduce translator burden if translated in future.

- - - - -
36e8ff9d by Lyndon Brown at 2022-01-29T07:56:05+00:00
bluray: translate option choice labels

- - - - -
b60b391d by Lyndon Brown at 2022-01-29T07:56:05+00:00
anaglyph: translate option choice labels

- - - - -
3e874f8f by Lyndon Brown at 2022-01-29T07:56:05+00:00
declink,sdiout: translate video-connection option choice labels

also, do the "undefined" entry of another option.

- - - - -
7304217b by Lyndon Brown at 2022-01-29T07:56:05+00:00
directsound: translate option choice labels

- - - - -
0061e2c5 by Lyndon Brown at 2022-01-29T07:56:05+00:00
qsv: switch confusing "decide" labels to "Undefined" and translate

these map to the 'unknown' constants, and presumably mean
undefined/unset/unspecified. "decide" i feel was just very
confusing.

- - - - -
4f1d708c by Lyndon Brown at 2022-01-29T07:56:05+00:00
qsv: translate profile-name option choice labels

- - - - -
40cb631d by Lyndon Brown at 2022-01-29T07:56:05+00:00
add "too technical" to translate note to some plugin text

per discussion in !90, these strings were considered "too technical"
and/or advanced to want translations for, at the risk of ending up with
poor translations.

it is hoped that by adding these comments, it will avoid such unwanted
translation being resubmitted by anyone later.

- - - - -
535509c9 by Lyndon Brown at 2022-01-29T07:56:05+00:00
core: fix two unwanted same longtexts

creating pointless tooltips.

cf. d75459a35b98cb8e6a5978e776335bd5b87ea52b (one missed, one added since).

- - - - -


17 changed files:

- modules/access/amt.c
- modules/access/bluray.c
- modules/audio_filter/resampler/soxr.c
- modules/audio_output/directsound.c
- modules/codec/aom.c
- modules/codec/qsv.c
- modules/codec/rav1e.c
- modules/hw/mmal/converter.c
- modules/hw/vaapi/filters.c
- modules/stream_out/sdi/sdiout.cpp
- modules/stream_out/transcode/transcode.c
- modules/text_renderer/sapi.cpp
- modules/video_filter/anaglyph.c
- modules/video_filter/extract.c
- modules/video_filter/opengl.c
- modules/video_output/decklink.cpp
- src/libvlc-module.c


Changes:

=====================================
modules/access/amt.c
=====================================
@@ -70,7 +70,7 @@
 #define TIMEOUT_TEXT N_("Native multicast timeout (sec)")
 #define AMT_RELAY_ADDRESS N_("AMT relay (IP address or FQDN)")
 #define AMT_RELAY_ADDR_LONG N_("AMT relay anycast address, or specify the relay you want by address or fully qualified domain name")
-#define AMT_DEFAULT_RELAY N_("amt-relay.m2icast.net")
+#define AMT_DEFAULT_RELAY "amt-relay.m2icast.net"
 
 /*****************************************************************************
  * Various Lengths of Msgs or Hdrs


=====================================
modules/access/bluray.c
=====================================
@@ -217,7 +217,7 @@ static bool BDJO_IsBlacklisted(demux_t *p_demux, const char *psz_bd_path)
 static const char *const ppsz_region_code[] = {
     "A", "B", "C" };
 static const char *const ppsz_region_code_text[] = {
-    "Region A", "Region B", "Region C" };
+    N_("Region A"), N_("Region B"), N_("Region C") };
 
 #define REGION_DEFAULT   1   /* Index to region list. Actual region code is (1<<REGION_DEFAULT) */
 #define LANGUAGE_DEFAULT ("eng")


=====================================
modules/audio_filter/resampler/soxr.c
=====================================
@@ -43,6 +43,7 @@
 static const int soxr_resampler_quality_vlclist[] = { 0, 1, 2, 3, 4 };
 static const char *const soxr_resampler_quality_vlctext[] =
 {
+     /* Note: Skip translation - too technical */
      "Quick cubic interpolation",
      "Low 16-bit with larger roll-off",
      "Medium 16-bit with medium roll-off",


=====================================
modules/audio_output/directsound.c
=====================================
@@ -48,8 +48,8 @@ static HRESULT StreamStart( aout_stream_t *, audio_sample_format_t *,
                             const GUID * );
 static void * PlayedDataEraser( void * );
 /* Speaker setup override options list */
-static const char *const speaker_list[] = { "Windows default", "Mono", "Stereo",
-                                            "Quad", "5.1", "7.1" };
+static const char *const speaker_list[] = { N_("Windows default"), N_("Mono"), N_("Stereo"),
+                                            N_("Quad"), N_("5.1"), N_("7.1") };
 
 /*****************************************************************************
  * Module descriptor


=====================================
modules/codec/aom.c
=====================================
@@ -108,6 +108,7 @@ vlc_module_begin ()
         set_capability("video encoder", 101)
         set_description(N_("AOM video encoder"))
         set_callback(OpenEncoder)
+        /* Note: Skip label translation for these - too technical */
         add_integer( SOUT_CFG_PREFIX "profile", 0, "Profile", PROFILE_LONGTEXT )
             change_integer_range( 0, 2 )
             change_integer_list( pi_profile_values_list, ppsz_profile_text )


=====================================
modules/codec/qsv.c
=====================================
@@ -156,13 +156,13 @@ static const int profile_h264_list[] =
       { MFX_PROFILE_UNKNOWN, MFX_PROFILE_AVC_CONSTRAINED_BASELINE, MFX_PROFILE_AVC_MAIN,
       MFX_PROFILE_AVC_EXTENDED, MFX_PROFILE_AVC_HIGH };
 static const char *const profile_h264_text[] =
-    { "decide", "baseline", "main", "extended", "high" };
+    { N_("Undefined"), N_("baseline"), N_("main"), N_("extended"), N_("high") };
 
 static const int profile_mpeg2_list[] =
     { MFX_PROFILE_UNKNOWN, MFX_PROFILE_MPEG2_SIMPLE, MFX_PROFILE_MPEG2_MAIN,
       MFX_PROFILE_MPEG2_HIGH };
 static const char *const profile_mpeg2_text[] =
-    { "decide", "simple", "main", "high" };
+    { N_("Undefined"), N_("simple"), N_("main"), N_("high") };
 
 static const int level_h264_list[] =
     { MFX_LEVEL_UNKNOWN, MFX_LEVEL_AVC_1, MFX_LEVEL_AVC_1b, MFX_LEVEL_AVC_12,
@@ -171,20 +171,20 @@ static const int level_h264_list[] =
       MFX_LEVEL_AVC_41, MFX_LEVEL_AVC_42, MFX_LEVEL_AVC_5, MFX_LEVEL_AVC_51,
       MFX_LEVEL_AVC_52};
 static const char *const level_h264_text[] =
-    { "decide", "1", "1.1b", "1.2", "1.3", "2", "2.1", "2.2", "3", "3.1",
+    { N_("Undefined"), "1", "1.1b", "1.2", "1.3", "2", "2.1", "2.2", "3", "3.1",
       "3.2", "4", "4.1",   "4.2",   "5", "5.1", "5.2" };
 
 static const int level_mpeg2_list[] =
     { MFX_LEVEL_UNKNOWN, MFX_LEVEL_MPEG2_LOW, MFX_LEVEL_MPEG2_MAIN,
       MFX_LEVEL_MPEG2_HIGH, MFX_LEVEL_MPEG2_HIGH1440 };
 static const char *const level_mpeg2_text[] =
-    { "decide", "low", "main", "high", "high1440" };
+    { N_("Undefined"), N_("low"), N_("main"), N_("high"), N_("high1440") };
 
 static const int target_usage_list[] =
     { MFX_TARGETUSAGE_UNKNOWN, MFX_TARGETUSAGE_BEST_QUALITY, MFX_TARGETUSAGE_BALANCED,
       MFX_TARGETUSAGE_BEST_SPEED };
 static const char *const target_usage_text[] =
-    { "decide", "quality", "balanced", "speed" };
+    { N_("Undefined"), N_("quality"), N_("balanced"), N_("speed") };
 
 static const int rc_method_list[] =
     { MFX_RATECONTROL_CBR, MFX_RATECONTROL_VBR,


=====================================
modules/codec/rav1e.c
=====================================
@@ -301,6 +301,7 @@ vlc_module_begin()
     set_capability("video encoder", 105)
     set_callback(OpenEncoder)
     set_subcategory(SUBCAT_INPUT_VCODEC)
+    /* Note: Skip label translation for these - too technical */
     add_integer(SOUT_CFG_PREFIX "profile", 0, "Profile", NULL)
         change_integer_range(0, 3)
     add_integer(SOUT_CFG_PREFIX "bitdepth", 8, "Bit Depth", NULL)


=====================================
modules/hw/mmal/converter.c
=====================================
@@ -49,6 +49,8 @@ typedef enum filter_resizer_e {
 
 #ifndef NDEBUG
 #define MMAL_CONVERTER_TYPE_NAME "mmal-hw-converter"
+
+/* Note: Skip translation of these - too technical */
 #define MMAL_CONVERTER_TYPE_TEXT "Hardware used for MMAL conversions"
 #define MMAL_CONVERTER_TYPE_LONGTEXT "Hardware component used for MMAL conversions. Hardware Video Scaler"\
         " (default) gives the best result and allows blending, Resizer is slower but uses less memory."


=====================================
modules/hw/vaapi/filters.c
=====================================
@@ -1140,6 +1140,7 @@ vlc_module_begin()
 
     add_submodule()
     set_callback_video_filter(OpenDenoiseFilter)
+    /* Note: Skip label translation - too technical */
     add_float_with_range("denoise-sigma", 1.f, .0f, 2.f,
                          "Denoise strength",
                          "Set the Denoise strength. (Defaults to 1).")


=====================================
modules/stream_out/sdi/sdiout.cpp
=====================================
@@ -94,18 +94,19 @@ static const char *const ppsz_videoconns[] = {
     "svideo"
 };
 static const char *const ppsz_videoconns_text[] = {
-    "SDI",
-    "HDMI",
-    "Optical SDI",
-    "Component",
-    "Composite",
-    "S-video",
+    N_("SDI"),
+    N_("HDMI"),
+    N_("Optical SDI"),
+    N_("Component"),
+    N_("Composite"),
+    N_("S-video"),
 };
 static const int rgi_afd_values[] = {
     0, 2, 3, 4, 8, 9, 10, 11, 13, 14, 15,
 };
 static const char * const rgsz_afd_text[] = {
-    "Undefined",
+    /* Note: Skip further translation - too technical */
+    N_("Undefined"),
     "Box 16:9 (top aligned)",
     "Box 14:9 (top aligned)",
     "Box > 16:9 (centre aligned)",


=====================================
modules/stream_out/transcode/transcode.c
=====================================
@@ -133,6 +133,7 @@
     "between decoder/encoder threads when threads > 0" )
 
 
+/* Note: Skip adding translated accompanying labels - too technical, not worth it */
 static const char *const ppsz_deinterlace_type[] =
 {
     "deinterlace", "ffmpeg-deinterlace"


=====================================
modules/text_renderer/sapi.cpp
=====================================
@@ -57,6 +57,7 @@ vlc_module_begin ()
  set_subcategory(SUBCAT_VIDEO_SUBPIC)
 
  set_callback_text_renderer(Create, 0)
+ /* Note: Skip label translation - too technical */
  add_integer("sapi-voice", -1, "Voice Index", nullptr)
 vlc_module_end ()
 


=====================================
modules/video_filter/anaglyph.c
=====================================
@@ -57,11 +57,11 @@ static const char *const ppsz_scheme_values[] = {
     "magenta-cyan",
     };
 static const char *const ppsz_scheme_descriptions[] = {
-    "pure red (left)  pure green (right)",
-    "pure red (left)  pure blue (right)",
-    "pure red (left)  pure cyan (right)",
-    "pure green (left)  pure magenta (right)",
-    "magenta (left)  cyan (right)",
+    N_("pure red (left)  pure green (right)"),
+    N_("pure red (left)  pure blue (right)"),
+    N_("pure red (left)  pure cyan (right)"),
+    N_("pure green (left)  pure magenta (right)"),
+    N_("magenta (left)  cyan (right)"),
     };
 
 vlc_module_begin()


=====================================
modules/video_filter/extract.c
=====================================
@@ -57,7 +57,7 @@ static void get_custom_from_packedyuv422( picture_t *, picture_t *, int * );
 
 static const int pi_component_values[] = { 0xFF0000, 0x00FF00, 0x0000FF };
 static const char *const ppsz_component_descriptions[] = {
-    "Red", "Green", "Blue" };
+    N_("Red"), N_("Green"), N_("Blue") };
 
 /*****************************************************************************
  * Module descriptor


=====================================
modules/video_filter/opengl.c
=====================================
@@ -303,6 +303,9 @@ gl_create_failure:
     return VLC_EGENERIC;
 }
 
+#define FILTER_LIST_TEXT N_( "OpenGL filter" )
+#define FILTER_LIST_LONGTEXT N_( "List of OpenGL filters to execute" )
+
 vlc_module_begin()
     set_shortname( N_("opengl") )
     set_description( N_("Opengl filter executor") )
@@ -311,5 +314,5 @@ vlc_module_begin()
     add_shortcut( "opengl" )
     set_callback( Open )
     add_module_list( "opengl-filter", "opengl filter", NULL,
-                     "opengl filter", "List of OpenGL filters to execute" )
+                     FILTER_LIST_TEXT, FILTER_LIST_LONGTEXT )
 vlc_module_end()


=====================================
modules/video_output/decklink.cpp
=====================================
@@ -137,12 +137,12 @@ static const char *const ppsz_videoconns[] = {
     "svideo"
 };
 static const char *const ppsz_videoconns_text[] = {
-    "SDI",
-    "HDMI",
-    "Optical SDI",
-    "Component",
-    "Composite",
-    "S-video",
+    N_("SDI"),
+    N_("HDMI"),
+    N_("Optical SDI"),
+    N_("Component"),
+    N_("Composite"),
+    N_("S-video"),
 };
 static const BMDVideoConnection rgbmd_videoconns[] =
 {
@@ -160,17 +160,18 @@ static const int rgi_afd_values[] = {
     0, 2, 3, 4, 8, 9, 10, 11, 13, 14, 15,
 };
 static const char * const rgsz_afd_text[] = {
-    "0:  Undefined",
-    "2:  Box 16:9 (top aligned)",
-    "3:  Box 14:9 (top aligned)",
-    "4:  Box > 16:9 (centre aligned)",
-    "8:  Same as coded frame (full frame)",
-    "9:   4:3 (centre aligned)",
-    "10: 16:9 (centre aligned)",
-    "11: 14:9 (centre aligned)",
-    "13:  4:3 (with shoot and protect 14:9 centre)",
-    "14: 16:9 (with shoot and protect 14:9 centre)",
-    "15: 16:9 (with shoot and protect  4:3 centre)",
+    /* Note: Skip further translation - too technical */
+    N_("Undefined"),
+    "Box 16:9 (top aligned)",
+    "Box 14:9 (top aligned)",
+    "Box > 16:9 (centre aligned)",
+    "Same as coded frame (full frame)",
+    "4:3  (centre aligned)",
+    "16:9 (centre aligned)",
+    "14:9 (centre aligned)",
+    "4:3  (with shoot and protect 14:9 centre)",
+    "16:9 (with shoot and protect 14:9 centre)",
+    "16:9 (with shoot and protect  4:3 centre)",
 };
 static_assert(ARRAY_SIZE(rgi_afd_values) == ARRAY_SIZE(rgsz_afd_text), "afd arrays messed up");
 
@@ -178,8 +179,7 @@ static const int rgi_ar_values[] = {
     0, 1,
 };
 static const char * const rgsz_ar_text[] = {
-    "0:   4:3",
-    "1:  16:9",
+    "4:3", "16:9",
 };
 static_assert(ARRAY_SIZE(rgi_ar_values) == ARRAY_SIZE(rgsz_ar_text), "afd arrays messed up");
 


=====================================
src/libvlc-module.c
=====================================
@@ -356,7 +356,7 @@ static const int pi_deinterlace[] = {
     0, -1, 1
 };
 static const char * const  ppsz_deinterlace_text[] = {
-    "Off", "Automatic", "On"
+    N_("Off"), N_("Automatic"), N_("On")
 };
 
 #define DEINTERLACE_MODE_TEXT N_("Deinterlace mode")
@@ -1208,6 +1208,8 @@ static const char *const psz_recursive_list_text[] = {
 #define SHOW_HIDDENFILES_LONGTEXT N_( \
         "Ignore files starting with '.'" )
 
+#define EXTRACTOR_FLATTEN N_("Flatten files listed by extractors (archive)")
+
 #define SD_TEXT N_( "Services discovery modules")
 #define SD_LONGTEXT N_( \
      "Specifies the services discovery modules to preload, separated by " \
@@ -1572,7 +1574,7 @@ vlc_module_begin ()
         change_integer_list( pi_force_dolby_values, ppsz_force_dolby_descriptions )
     add_integer( "stereo-mode", 0, STEREO_MODE_TEXT, NULL )
         change_integer_list( pi_stereo_mode_values, ppsz_stereo_mode_texts )
-    add_integer( "mix-mode", AOUT_MIX_MODE_UNSET, MIX_MODE_TEXT, MIX_MODE_TEXT )
+    add_integer( "mix-mode", AOUT_MIX_MODE_UNSET, MIX_MODE_TEXT, NULL )
         change_integer_list( pi_mix_mode_values, ppsz_mix_mode_texts )
     add_integer( "audio-desync", 0, DESYNC_TEXT,
                  DESYNC_LONGTEXT )
@@ -2135,8 +2137,7 @@ vlc_module_begin ()
     add_integer( "fetch-art-threads", 1, FETCH_ART_THREADS_TEXT,
                  FETCH_ART_THREADS_LONGTEXT )
 
-    add_bool( "metadata-network-access", false, METADATA_NETWORK_TEXT,
-                 METADATA_NETWORK_TEXT )
+    add_bool( "metadata-network-access", false, METADATA_NETWORK_TEXT, NULL )
 
     add_string( "recursive", "collapse" , RECURSIVE_TEXT,
                 RECURSIVE_LONGTEXT )
@@ -2147,8 +2148,7 @@ vlc_module_begin ()
                 IGNORE_TEXT, IGNORE_LONGTEXT )
     add_bool( "show-hiddenfiles", false,
               SHOW_HIDDENFILES_TEXT, SHOW_HIDDENFILES_LONGTEXT )
-    add_bool( "extractor-flatten", false,
-              "Flatten files listed by extractors (archive)", NULL )
+    add_bool( "extractor-flatten", false, EXTRACTOR_FLATTEN, NULL )
         change_volatile()
 
     set_subcategory( SUBCAT_PLAYLIST_SD )



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/6e1eaef68c311e2a51154807d95d171b6d4dfe38...535509c9ad20698a7a890fbd22b41770d7e64064

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/6e1eaef68c311e2a51154807d95d171b6d4dfe38...535509c9ad20698a7a890fbd22b41770d7e64064
You're receiving this email because of your account on code.videolan.org.




More information about the vlc-commits mailing list