pacemaker icon indicating copy to clipboard operation
pacemaker copied to clipboard

translate fenced files for zh_cn

Open luckhuanhuan opened this issue 2 years ago • 4 comments

translate fenced files for zh_cn

luckhuanhuan avatar Jul 27 '22 10:07 luckhuanhuan

Can one of the admins verify this patch?

knet-ci-bot avatar Jul 27 '22 10:07 knet-ci-bot

test this please

wenningerk avatar Jul 27 '22 11:07 wenningerk

Hi,

Thank you for the additional translations. With previous translations, we figured out that including XML in the translated text causes problems. We solved that with the add_desc() function in lib/common/options.c. To avoid duplicating that effort, the best solution here will be to convert pacemakerd-fenced to use pcmk__format_option_metadata().

Thankfully, that is an easy process. The biggest step is to define an array of pcmk__cluster_option_t (which could be named fencer_options[]). Then all we need to do is call pcmk__format_option_metadata() with that array, in pacemaker-fenced.c's main() where it handles "metadata", instead of all the printf()'s. See crmd_opts[] and crmd_metadata() in daemons/controld/controld_control.c for an example with translations.

If you do not have time for that, I can take it and get back with you when it is ready.

kgaillot avatar Jul 27 '22 14:07 kgaillot

Hi,

Thank you for the additional translations. With previous translations, we figured out that including XML in the translated text causes problems. We solved that with the add_desc() function in lib/common/options.c. To avoid duplicating that effort, the best solution here will be to convert pacemakerd-fenced to use pcmk__format_option_metadata().

Thankfully, that is an easy process. The biggest step is to define an array of pcmk__cluster_option_t (which could be named fencer_options[]). Then all we need to do is call pcmk__format_option_metadata() with that array, in pacemaker-fenced.c's main() where it handles "metadata", instead of all the printf()'s. See crmd_opts[] and crmd_metadata() in daemons/controld/controld_control.c for an example with translations.

If you do not have time for that, I can take it and get back with you when it is ready.

OKay , I'll try it.

luckhuanhuan avatar Jul 28 '22 01:07 luckhuanhuan

Maybe try to get rid of that merge commit.

wenningerk avatar Sep 06 '22 07:09 wenningerk

If you closed because of the merge commit you wouldn't necessarily have to. If I screw things up on a branch I usually delete it on my local clone, recreate it and fast-forward-push it to my github-repo. If that was for other reasons please forget my comment ;-)

wenningerk avatar Sep 09 '22 09:09 wenningerk