bug-gettext
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gettextizing an old Java application


From: Kovács Zoltán
Subject: gettextizing an old Java application
Date: Mon, 13 Nov 2023 21:46:56 +0100

Dear List,
I am trying to use xgettext to create a .pot file from an existing Java source code. Unfortunately, the code seems to be written a bit differently than expected by xgettext:

1. Several calls include two msgid's, for example:
translate("File", "The File Menu");
where the first string is the name of the menu and the second one is its tooltip. In such cases I cannot get both translations at the same time because xgettext gives me the following error: "ambiguous argument specification for keyword 'translate'". Here I use the command line options "-ktranslate:1 -ktranslate:2". I get only the first entry "File", the other one is not present in the .pot file.

2. I tried to work this around by splitting the method translate() into two calls translateMenuitem() and translateTooltip() and call a final method translateString() separately, but seemingly there is no semantic analysis to find out that translateString() is called via another calls, so I get no output here at all.

Is there a way to solve this?

Thanks for any hints in advance.

Best regards, Zoltan

--

Dr. Zoltán Kovács, MSc

Institut Ausbildung

 

Private Pädagogische Hochschule der Diözese Linz
Private University of Education, Diocese Linz
Salesianumweg 3, 4020 Linz
Mail: zoltan.kovacs@ph-linz.at

Web: www.ph-linz.at



Attachment: Test1.java
Description: application/ms-java

Attachment: Test2.java
Description: application/ms-java


reply via email to

[Prev in Thread] Current Thread [Next in Thread]