[pve-devel] Proxmox VE 2.0 beta 4 i18n patch

Koichi MATSUMOTO mzch at me.com
Wed Dec 7 11:54:21 CET 2011


Hi Dietmar,

On 2011/12/07, at 17:40, Dietmar Maurer wrote:

> Hi Koichi,
> 
> you patch is simply too large. I always tell people to send small patches, so that I can review code and add my comments.
> 
> Your patch is more than 8000 Lines, so it would take a week or more to review the whole patch.

Oh, I thought the patches would have poor visibility if I had sent patches separately.
Should I repost them by the sub directories?

> 1.)  I replaced the string 'Other' with 'Other OS types'
> 
> 2.) You can't use gettext in performance critical render functions:
> 
>     render_kvm_ostype: function (value) {
> 	if (!value) {
> -	    return 'Other';
> +	    return gettext('Other');
> 	}
> 
> This is a performance killer. Instead I usually use a property which is initialized once
> to store the translated text:
> 
>    defaultText: gettext('Default'),
> 
> and the use that in performance critical functions:
> 
>    return PVE.Utils.defaultText;

I tried not to change the contexts of the source codes. I didn't feel so slow...,
but, well, maybe it's because I always use Google Chrome. Of course, I see your point.

> 3.) I am not sure if it really make sense to translate product names like 'Microsoft Windows 2000' or 'Cirrus Logic GD5446'. Do you think that is really needed (why)?

Sure. However, for examples, I think it would be strange that 'Windows' can't be
translated though 'Linux xxx Kernel' must be translated. In addition, 'Windows'
must be 'ウィンドウズ' on the official government documents or newspapers in Japan.
It's also registered as the trademark. Since 'Windows' is better known in English,
I decided not to translate it this time. How is the style in other languages?

> 4.) I would not translate language names like gettext('Japanese'). We only use those texts in the language selector, and it is probably better to always display the English version.

I see.

> 5.) You changed some already translated strings like:
(snip)
> You should first clarify why it is done that way. The reason is that error messages from the server are not translated anyways.
> So for now I would leave that as it is.

OK. :)

> 
> 6.) It is sometimes a good idea to change texts to minimize translation overhead. For example:
> 
> -	qmcreate: 'Create VM {0}',
> +	qmcreate: gettext('Create VM {0}'),
> -	vzcreate: 'Create CT {0}',
> +	vzcreate: gettext('Create CT {0}'),
> 
> I would use the following instead (split action from object):
> 
> +	qmcreate: gettext('Create {0}'),
> +	vzcreate: gettext('Create {0}'),	
> 
> Sure, that needs further changes in the code. I will commit those changes soon. Please can you
> verify that this works for Japanese too (you need to change those texts in ja.po)
> 
> I will try to include your changes in small steps. Please be patient - this will take some time.

Indeed, it's so much better. I know PVE 2.0 is under beta test, so I'm in no rush. ;)
If it's better to repost patches, please don't hesitate to ask me.

> - why do you translate 'NFS' , 'LVM' and 'iSCSI' - does that make sense for Japanese language?

Ah, no, they are as is in Japanese. They should be reverted.

> - you do not need to translate debug messages used with 'throw' (those should not trigger)

Wow, I got the wrong idea. I'll undo them.


--
 Koichi MATSUMOTO - http://maccoterie.com/
    contact me? please see http://mch.tel/
--
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4292 bytes
Desc: not available
URL: <http://lists.proxmox.com/pipermail/pve-devel/attachments/20111207/4e997d33/attachment.bin>


More information about the pve-devel mailing list