[vlc-devel] [PATCH 1/2] lua http: make string easier to translate

Rafaël Carré funman at videolan.org
Thu Jun 6 15:26:55 CEST 2013


Le 06/06/2013 15:15, Rob Jonson a écrit :
> On 6 June 2013 12:41, Rafaël Carré <funman at videolan.org> wrote:
> 
>> +"<!-- VLC_PASSWORD_NOT_SET --></body></html>";
>> +
>> +static const char no_password_body[] = N_(
>>  "<p>Password for Web interface has not been set.</p>"
>>  "<p>Please use --http-password, or set a password in </p>"
>>  "<p>Preferences > All > Main interfaces > Lua > Lua HTTP >
>> Password.</p>"
>> -"<!-- VLC_PASSWORD_NOT_SET --></body></html>");
>> +);
>> +
>>
> 
> Hi Rafël,
> 
> forgive me if I misunderstood this, but I think you are setting up this
> whole chunk of html to be translated.

Actually it is the reverse, previously the whole HTML chunk was
translated: marked as translatable with N_() and translated at runtime
with _()

Now it has been split in one untranslatable HTML chunk
(no_password_fmt), and 2 translatable bits: the title "VLC media player"
which is already translated (since it's used in other files), and the 3
lines body.

> the user-visible bits can certainly benefit from translation, but the
> comment
> <!-- VLC_PASSWORD_NOT_SET -->
> 
> should definitely not be translated. This is designed to be a
> machine-readable tag so that remote control apps can readily tell what is
> going on.

True, and I still need to add a comment in the file that reflects this.

> cheers,
> 
> Rob



More information about the vlc-devel mailing list