Skip to content

add ai generated translations.#1591

Merged
tsteven4 merged 17 commits intomasterfrom
aitr
Apr 10, 2026
Merged

add ai generated translations.#1591
tsteven4 merged 17 commits intomasterfrom
aitr

Conversation

@tsteven4
Copy link
Copy Markdown
Collaborator

@tsteven4 tsteven4 commented Apr 7, 2026

AI translations are supported with linguist 6.11.0.

using model qwen3:30b.
context was set to
"GPSBabel: convert, manipulate, and transfer data from GPS programs or GPS receivers."
for most of these. But for the failure I changed used the following, which may have resulted in faster translations.
"GPSBabel converts waypoints, tracks, and routes from one common
mapping format to another or a serial upload or download to a GPS
unit such as those from Garmin.
GPSBabel supports several data formats and will be useful for
tasks such as geocaching, mapping, and converting from one GPS
unit to another. Among the interesting formats it supports are
the GPS Exchange Format (GPX), Keyhole Markup Language (KML), several
GPS devices via a serial link, and various Geocaching data formats.
GPSBabel also supports various filters to manipulate the data."

Note the the TS element language element for gpsbabelfe_it.ts was
set to en_US. This has been corrected.

I marked the aboutui.ui QTextEdit as non-translatable. Most of this
text is the license, and these are not provided. See
https://www.gnu.org/licenses/old-licenses/gpl-2.0-faq.html#TOCGPLTranslations

tsteven4 added 2 commits April 7, 2026 00:15
using model qwen3:30b.
context was set to
"GPSBabel: convert, manipulate, and transfer data from GPS programs or GPS receivers."
for most of these.  But for the failure I changed used the following, which may have resulted in faster translations.
"GPSBabel converts waypoints, tracks, and routes from one common
mapping format to another or a serial upload or download to a GPS
unit such as those from Garmin.
GPSBabel supports several data formats and will be useful for
tasks such as geocaching, mapping, and converting from one GPS
unit to another.  Among the interesting formats it supports are
the GPS Exchange Format (GPX), Keyhole Markup Language (KML), several
GPS devices via a serial link, and various Geocaching data formats.
GPSBabel also supports various filters to manipulate the data."

Note the the TS element language element for gpsbabelfe_it.ts was
set to en_US.  This has been corrected.

I marked the aboutui.ui QTextEdit as non-translatable.  Most of this
text is the license, and these are not provided.  See
https://www.gnu.org/licenses/old-licenses/gpl-2.0-faq.html#TOCGPLTranslations
@tsteven4
Copy link
Copy Markdown
Collaborator Author

tsteven4 commented Apr 7, 2026

In addition to supplying missing translations for existing languages this also added translations for ja(_JP), zh_CN, zh_TW, pt_PT, pt_BR.

@codacy-production
Copy link
Copy Markdown

codacy-production Bot commented Apr 7, 2026

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 duplication

Metric Results
Duplication 0

View in Codacy

🟢 Coverage ∅ diff coverage · +0.01% coverage variation

Metric Results
Coverage variation +0.01% coverage variation
Diff coverage diff coverage

View coverage diff in Codacy

Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (6a7b118) 28093 17679 62.93%
Head commit (fae142b) 56195 (+28102) 35367 (+17688) 62.94% (+0.01%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#1591) 0 0 ∅ (not applicable)

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

TIP This summary will be updated as you push new changes. Give us feedback

tsteven4 added 3 commits April 7, 2026 00:53
some ts files are named just after the language, but some
also have a country, e.g.
qtbase_de.qm qtbase_zh_TW.qm
This has been recommended since at least Qt 5.15.
Using QLocale searches through QLocale::uiLanguages.
On macos this results in pt_US finding pt_BR (If the region is US
and the language is set to Portugese(Brazil) pt_US is the system
locale name.)
Previously pt_BR was not found under these conditions.
I also noticed qtbase_[zh_CN, zh_TW, pt_BR, ja].qm don't have any
translations, but those files do exist.
@tsteven4
Copy link
Copy Markdown
Collaborator Author

tsteven4 commented Apr 7, 2026

I did this with ollama running in a docker container.

tsteven4 added 12 commits April 8, 2026 09:16
This really choked on the rich text from "wayptsui.ui" line="187".
It caused the last 7 translations to fail.  I handcrafted the actual
text sections from that source into separate messages, deleted the
message for line 187, and translated that.  Then I restored the message
for line 187, copied from the source to the translation, and pasted in
the translations from the separate messages.  Then I deleted the two
separate messages. Uggh!
@tsteven4
Copy link
Copy Markdown
Collaborator Author

      1.10.0 1.11.0
Language (with qtbase support) # of speakers (millions) fraction of total speakers translations available translations available
English 1490 28.7%
Chinese 1180 22.7%
Spanish 561 10.8%
Arabic 330 6.3%
French 310 6.0%
Portuguese 264 5.1%
Russian 255 4.9%
German 133 2.6%
Japanese 125 2.4%
Turkish 90 1.7%
Korean 82 1.6%
Persian 79 1.5%
Italian 67 1.3%
Polish 45 0.9%
Ukrainian 41 0.8%
Dutch 28 0.5%
Ganda 20 0.4%
Czech 13 0.3%
Hungarian 13 0.3%
Hebrew 10 0.2%
Swedish 10 0.2%
Bulgarian 9 0.2%
Catalan 9 0.2%
Danish 6 0.1%
Finnish 6 0.1%
Croatian 5 0.1%
Norwegian 5 0.1%
Slovak 5 0.1%
Georgian 4 0.1%
Latvian 2 0.0%
Gaelic 0.06 0.0%

@tsteven4 tsteven4 merged commit c7ee736 into master Apr 10, 2026
60 of 62 checks passed
@tsteven4 tsteven4 deleted the aitr branch April 10, 2026 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant