why my translation can not work?

Discuss and coordinate development of mainline and user-made content translations.

Moderator: Forum Moderators

Post Reply
User avatar
ERROR1025
Posts: 46
Joined: February 23rd, 2020, 10:18 am

why my translation can not work?

Post by ERROR1025 »

zip file is can not work translation add-on
po file is use make mo file
Attachments
zh.po
(2.02 KiB) Downloaded 62 times
NowWesnoth.zip
(45.92 KiB) Downloaded 56 times
User avatar
octalot
General Code Maintainer
Posts: 786
Joined: July 17th, 2010, 7:40 pm
Location: Austria

Re: why my translation can not work?

Post by octalot »

Wesnoth can read .po files directly (since Wesnoth 1.14), so there's no need to manipulate a .mo file.

Details about where to put the .po and make it work are on GettextForWesnothDevelopers#Generating_the_.pot_and_.po_files_for_UMC.
gnombat
Posts: 706
Joined: June 10th, 2010, 8:49 pm

Re: why my translation can not work?

Post by gnombat »

Try making these changes:
  1. In _main.cfg, move the [textdomain]...[/textdomain] code so it occurs before the #ifdef MULTIPLAYER line.
  2. In other files - use the line #textdomain test (example: in the file units/Loyalists/Bomber.cfg, change #textdomain wesnoth-units to #textdomain test).
octalot wrote: October 22nd, 2022, 3:59 pm Wesnoth can read .po files directly (since Wesnoth 1.14), so there's no need to manipulate a .mo file.
It is simpler to just use the .po files, but the .mo files should still work.
User avatar
ERROR1025
Posts: 46
Joined: February 23rd, 2020, 10:18 am

Re: why my translation can not work?

Post by ERROR1025 »

octalot wrote: October 22nd, 2022, 3:59 pm Wesnoth can read .po files directly (since Wesnoth 1.14), so there's no need to manipulate a .mo file.

Details about where to put the .po and make it work are on GettextForWesnothDevelopers#Generating_the_.pot_and_.po_files_for_UMC.
Now,can not work too(use po file)
Attachments
NowWesnoth.zip
(46.82 KiB) Downloaded 53 times
gnombat
Posts: 706
Joined: June 10th, 2010, 8:49 pm

Re: why my translation can not work?

Post by gnombat »

The .po file doesn't look right, I've attached a fixed version.
Attachments
zh_CN.po
(1.73 KiB) Downloaded 51 times
User avatar
ERROR1025
Posts: 46
Joined: February 23rd, 2020, 10:18 am

Re: why my translation can not work?

Post by ERROR1025 »

gnombat wrote: October 23rd, 2022, 1:47 pm The .po file doesn't look right, I've attached a fixed version.
Thanks,is work.
i hope know my make po file where have a bug?
gnombat
Posts: 706
Joined: June 10th, 2010, 8:49 pm

Re: why my translation can not work?

Post by gnombat »

ERROR1025 wrote: October 23rd, 2022, 2:17 pm
gnombat wrote: October 23rd, 2022, 1:47 pm The .po file doesn't look right, I've attached a fixed version.
Thanks,is work.
i hope know my make po file where have a bug?
The line msgid "" (with the empty string) is a special case, it represents the "header" of the file and it should be the first entry in the file (and it should not appear anywhere else in the file). It should be followed by msgstr "" and then the header lines (example: "Project-Id-Version: ...\n", etc.).

This document describes the .po format in detail.
Post Reply