unraid / usb-creator-next

The home of the Next-Gen Unraid USB Creator, a fork of the Raspberry Pi Imager
https://unraid.net/getting-started
Other
6 stars 3 forks source link

Translation Support #9

Open elibosley opened 7 months ago

elibosley commented 7 months ago

Ensure All Strings are Written to Support the Existing Localization In Raspberry Pi Creator

We’d like to add translations, which I believe the Raspberry PI creator supports. Ensuring that the text in the App continues to use translation strings so that we can add support for other languages after launch is necessary.

elibosley commented 3 months ago

@jlre249 can you please document the strings that were added so that we can get them translated?

Alternatively just link me to the file where the strings are referenced!

jlre249 commented 3 months ago

Translation files

All of the translation files are src/i18n. They appear to be in the form of XML files, specifying the file, the line number (which seems sort of fragile to me, since you would presumably have to update the line number in all of the translation files if the line number changes?? I wonder if that's actually necessary), the source string, and the translated string.

Strings that are completely new

File Line # String
src/main.qml 25 "Unraid USB Creator v%1"
92 "Help"
1291 "GUID: %1"
1292 "[BLACKLISTED - Choose Another Flash Device]"
1294 "[MISSING GUID - Choose Another Flash Device]"
1339 "About"
1341 "License, Credits, and History: "
1341 "Help / Feedback: "
1496 "If you would like to enable legacy boot (bios), helpful for old hardware, please run the 'makebootable(mac/linux/windows)' script from this computer, located in the main folder of the UNRAID flash drive."
src/UnraidOptionsPopup.qml 84 "Settings"
105 "Server Name:"
122 "Tower"
132 "Network Mode:"
137 "DHCP"
144 "Static IP"
154 "IP Address:"
157 "Netmask:"
214 "Gateway:"
218 "DNS Server:"
230 "CONTINUE"
src/downloadextractthread.cpp 432 "Error running make_bootable script"
src/driveformatthread.cpp 159 "Elevated privileges needed to properly format drive."

Strings that existed, but were modified

File Line # String
src/main.qml 1350 "Unraid USB Creator is still busy.
Are you sure you want to quit?"
1400 "There is a newer version of Unraid USB Creator available.
Would you like to visit the website to download it?"
1906 "Connect an USB stick containing images first.
The images must be located in the root folder of the USB stick."
src/imagewriter.cpp 619 "Format USB Drive as FAT32"
626 "Select an Unraid .zip file from your computer"

Note about existing translations

Upon glancing briefly at the German translation file, I noticed that some translations are assuming SD card usage, even when the corresponding English text does not, such as:

    <message>
        <location filename="../main.qml" line="194"/>
        <location filename="../main.qml" line="979"/>
        <source>Storage</source>
        <translation>SD-Karte</translation>
    </message>

and

    <message>
        <location filename="../main.qml" line="205"/>
        <location filename="../main.qml" line="1317"/>
        <source>CHOOSE STORAGE</source>
        <translation>SD-KARTE WÄHLEN</translation>
    </message>

So, I guess my thought here is that even strings that have existing translations in the rpi files might need to be reviewed.

elibosley commented 3 months ago

Thank you for the documentation. I'll get this over to the team and start translating soon. I can't imagine line numbers matter for anything but finding the translations yourself...