mirror of
https://github.com/pbatard/rufus.git
synced 2024-08-14 23:57:05 +00:00
[internal] reorganize localization resources
This commit is contained in:
parent
704fd9dd22
commit
0fa19d7019
21 changed files with 130 additions and 162 deletions
273
res/loc/ChangeLog.txt
Normal file
273
res/loc/ChangeLog.txt
Normal file
|
@ -0,0 +1,273 @@
|
|||
This file lists any change that has been applied to the en-US translation of
|
||||
rufus.loc since its original version. Translators are expected to keep their
|
||||
translations up to date by monitoring this file on regular basis and applying
|
||||
the same changes.
|
||||
|
||||
When editing an existing translation, make sure you always follow:
|
||||
https://github.com/pbatard/rufus/wiki/Localization#Editing_a_translation
|
||||
|
||||
Remember to also update the version number for your translation ('v x.y.z')
|
||||
once you have matched all the changes that occurred for the en-US translation.
|
||||
|
||||
!!IMPORTANT!! The changes below may NOT contain the full message and only tell
|
||||
you WHERE, in the English translation, you should look to find the full message
|
||||
content. PLEASE, do not just look at this Changelog when updating your
|
||||
translation, but always use the English section of rufus.loc as your base.
|
||||
For instance, MSG_114, that was introduced in v1.0.8 is MORE than one line!
|
||||
|
||||
o v3.2 (2018.??.??)
|
||||
- *NEW* MSG_087
|
||||
- *NEW* MSG_172
|
||||
- *NEW* MSG_199
|
||||
- *NEW* MSG_306
|
||||
|
||||
o v3.0 (2018.03.27)
|
||||
- All positioning ('m', 's') has now been removed as well as some controls, for the 3.0 UI redesign
|
||||
- *NEW* IDS_DRIVE_PROPERTIES_TXT "Drive Properties"
|
||||
- *NEW* IDS_BOOT_SELECTION_TXT "Boot selection"
|
||||
Note: The current translation was taken from MSG_278 when available, which was for "Boot type".
|
||||
However, "Boot selection", is more appropriate, so please update if it makes sense.
|
||||
- *NEW* IDC_SELECT "Select"
|
||||
- *NEW* IDS_IMAGE_OPTION_TXT "Image Option"
|
||||
- *UPDATED* IDS_PARTITION_TYPE_TXT Partition scheme and target system type -> "Partition scheme"
|
||||
- *NEW* IDS_TARGET_SYSTEM_TXT "Target system"
|
||||
- *REPLACED* IDS_LABEL_TXT "New Volume label" -> "Volume label"
|
||||
- *NEW* IDS_STATUS_TXT "Status"
|
||||
- *REPLACED* MSG_031 -> "BIOS (or UEFI-CSM)"
|
||||
- *REPLACED* MSG_032 -> "UEFI (non CSM)"
|
||||
- *REPLACED* MSG_033 -> "BIOS or UEFI"
|
||||
- *REMOVED* MSG_087
|
||||
- *RENAMED* IDC_WINDOWS_INSTALL -> MSG_117
|
||||
- *RENAMED* IDC_WINDOWS_TO_GO -> MSG_118
|
||||
Note: In most cases, you should not have to add MSG_118 as the English for "Windows To Go" should work for most countries.
|
||||
- *NEW* MSG_119 "advanced drive properties"
|
||||
- *NEW* MSG_120 "advanced format options"
|
||||
- *NEW* MSG_121 "Show %s"
|
||||
- *NEW* MSG_122 "Hide %s"
|
||||
MSG_119/120 + MSG_121/122 are used to create the advanced options clickable toolbars
|
||||
- *REPLACED* MSG_150 -> "Type of computer you plan to use this bootable drive with. It is your responsibility to determine whether "
|
||||
"your target is of BIOS or UEFI type before you start creating the drive, as it may fail to boot otherwise."
|
||||
- *REPLACED* MSG_151 -> "'UEFI-CSM' means that the device will only boot in BIOS emulation mode (also known as 'Legacy Mode') under UEFI, and not in native UEFI mode."
|
||||
Be mindful that you probably don't want to translate 'Legacy Mode' as this is an option that usually appears in English in the UEFI settings.
|
||||
- *REPLACED* MSG_152 -> "'non CSM' means that the device will only boot in native UEFI mode, and not in BIOS emulation mode (also known as 'Legacy Mode')."
|
||||
- *REPLACED* MSG_163 -> "Method that will be used to create partitions"
|
||||
- *REMOVED* MSG_172
|
||||
- *REMOVED* MSG_199
|
||||
- *REMOVED* MSG_200
|
||||
- *NEW* MSG_278 "Checking for conflicting processes..."
|
||||
- *REPLACED* MSG_280 "Image selection" -> "Disk or ISO image"
|
||||
- *REPLACED* MSG_281 "(Please select an image)" -> "%s (Please select)"
|
||||
MSG_281 + MSG_280 are used to create the message that appears in the boot selection dropdown when an image has not been selected.
|
||||
- *UPDATED* MSG_298 The '#' button is now the (✓) button
|
||||
- *NEW* MSG_299 "Timestamp validation error"
|
||||
- *NEW* MSG_300 "Rufus could not validate that the timestamp of the downloaded update is more recent than the one for the "
|
||||
"current executable.\n\nIn order to prevent potential attack scenarios, the update process has been aborted and "
|
||||
"the download will be deleted. Please check the log for more details."
|
||||
- *NEW* MSG_301 "Show application settings"
|
||||
- *NEW* MSG_302 "Show information about this application"
|
||||
- *NEW* MSG_303 "Show the log"
|
||||
- *NEW* MSG_304 "Create a disk image of the selected device"
|
||||
- *NEW* MSG_305 "Use this option to indicate whether you want to use this device to install Windows on another disk, "
|
||||
"or if you want to run Windows directly from this drive (Windows To Go)."
|
||||
- *UPDATED* On IDD_LOG, IDC_LOG_CLEAR, IDC_LOG_SAVE and IDCANCEL were updated to remove the redundant mention of "Log" in the buttons
|
||||
for the languages who did that. This means that "Save Log", "Clear Log" "Close Log" have become "Save", "Clear", "Close".
|
||||
*PLEASE* verify that the modification looks correct in your language.
|
||||
|
||||
o v2.16 (2017.07.17)
|
||||
- *NEW* MSG_295 "Warning: Unofficial version"
|
||||
- *NEW* MSG_296 "This version of Rufus was NOT produced by its official developer(s).\n\nAre you sure you want to run it?"
|
||||
- *NEW* MSG_297 "Truncated ISO detected"
|
||||
- *NEW* MSG_298 "The ISO file you have selected does not match its declared size: %s of data is missing!\n\nIf you obtained "
|
||||
"this file from the Internet, you should try to download a new copy and verify that the MD5 or SHA checksums match the "
|
||||
"official ones.\n\nNote that you can compute the MD5 or SHA in Rufus by clicking the '#' button."
|
||||
Note: You can test MSG_297/MSG_298 using https://rufus.akeo.ie/testing/arch_trunc.iso (A truncated version of archlinux-2017.07.01-x86_64.iso)
|
||||
|
||||
o v2.12 (2017.01.16)
|
||||
- *NEW* MSG_288 "Missing elevated privileges"
|
||||
- *NEW* MSG_289 "This application can only run with elevated privileges"
|
||||
This message, along with the previous, is just to notify the user when they have
|
||||
managed to run Rufus in non-elevated mode. This shouldn't happen in most case
|
||||
so this is not something that you can easily test.
|
||||
- *NEW* MSG_290 "File Indexing"
|
||||
This is a cheat mode that can be tested with Alt-Q, that is equivalent to the
|
||||
"Allow files on this drive to have contents indexed in addition to file properties"
|
||||
(i.e. file indexing) option one can see when looking at the drive properties. See:
|
||||
https://rufus.akeo.ie/pics/FileIndexing.png
|
||||
- *NEW* MSG_291 "Version selection"
|
||||
- *NEW* MSG_292 "Please select the version of Windows you want to install:"
|
||||
These two messages are used when the user has the possibility to select between
|
||||
multiple versions of Windows in Windows To Go mode. In this case, a prompt like
|
||||
this will appear, using these 2 messages: https://rufus.akeo.ie/pics/Win2GoVersion.png
|
||||
If you have an official Windows ISO, and the platform you run Rufus on supports
|
||||
Windows To Go (Windows 8 or later *ONLY*), you should be able to test this message.
|
||||
- *NEW* MSG_293 "Unsupported Windows version"
|
||||
- *NEW* MSG_294 "This version of Windows is no longer supported by Rufus."
|
||||
These two messages are not used anywhere yet, but may be needed in a future prompt.
|
||||
|
||||
o v2.9 (2016.05.09)
|
||||
- *NEW* MSG_286 "Zeroing drive: %0.1f%% completed"
|
||||
Used when filling a whole drive with zero bytes, to display progress in percent (e.g. "Zeroing drive: 12.3% completed")
|
||||
Can be tested with Alt-Z (CAUTION: THIS WILL COMPLETELY ERASE THE SELECTED DRIVE!!)
|
||||
- *NEW* MSG_287 "Detection of non-USB removable drives"
|
||||
Note, this message is followed by either "enabled"/"disabled" (see MSG_250/251) and is similar to MSG_253
|
||||
The message appears on the status bar and can be tested with Ctrl-Alt-F.
|
||||
|
||||
o v2.5 (2015.10.15)
|
||||
Note: The following message can be tested by pressing Alt-, (That's the 'Alt' and 'comma' keys on your keyboard)
|
||||
In case the message below is not clear, you can consider that it says "Exclusive locking of the USB drive"
|
||||
- *NEW* MSG_282 "Exclusive USB drive locking"
|
||||
Note: The following messages will appear after a new Rufus update has been downloaded from the
|
||||
Internet in case something is very wrong with its digital signature...
|
||||
- *NEW* MSG_283 "Invalid signature"
|
||||
- *NEW* MSG_284 "The downloaded executable is missing a digital signature."
|
||||
- *NEW* MSG_285 "The downloaded executable is signed by '%s'.\nThis is not a signature we recognize and could "
|
||||
"indicate some form of malicious activity...\nAre you sure you want to run this file?"
|
||||
|
||||
o v2.4 (2015.09.03)
|
||||
- Changed MSG_081 "Unsupported ISO" -> "Unsupported image"
|
||||
- Changed MSG_082 -> "This image is either non-bootable, or it uses a boot or compression method that is not supported by Rufus..."
|
||||
- *NEW* MSG_269 "Preserve timestamps"
|
||||
Note: You can use the Alt-T cheat mode to see this message. Also, if 'timestamp' doesn't really translate in your language,
|
||||
"file dates preservation" is a good approximation of what this is about.
|
||||
- *NEW* MSG_270 "USB debug"
|
||||
Note: You can use the Alt-. cheat mode to see the message above
|
||||
For an idea of what the 'checksums' in the 2 messages below are used for, see https://en.wikipedia.org/wiki/Md5sum:
|
||||
- *NEW* MSG_271 "Computing image checksums: %0.1f%% completed"
|
||||
- *NEW* MSG_272 "Compute the SHA1 and MD5 checksums for the selected image"
|
||||
- *NEW* MSG_273 "Change the application language"
|
||||
Note: You can see the message above by hovering on the language button
|
||||
- *NEW* MSG_274 "ISOHybrid image detected"
|
||||
Note: You can test this message and the one below by downloading and trying to write the latest menu_c32_test.iso (120 KB) from:
|
||||
https://github.com/pbatard/rufus/raw/master/res/localization/menu_c32_test.iso
|
||||
- *NEW* MSG_275 "The image you have selected is..." [TRANSLATORS: Please refer to the English section of 'rufus.loc' for the FULL message]
|
||||
For more info on the messages below, also see the comments in the English section of rufus.loc
|
||||
- *NEW* MSG_276 "Write in %s mode (Recommended)"
|
||||
- *NEW* MSG_277 "Write in %s mode"
|
||||
- *NEW* MSG_278 "Boot type"
|
||||
- *NEW* MSG_279 "Non bootable"
|
||||
- *NEW* MSG_280 "Image selection"
|
||||
- *NEW* MSG_281 "(Please select an image)"
|
||||
|
||||
o v2.0 (2015.02.04)
|
||||
- *NEW CONTROL* IDC_WINDOWS_INSTALL "Standard Windows installation" (Main dialog)
|
||||
- *NEW CONTROL* IDC_WINDOWS_TO_GO "Windows To Go" (Main dialog)
|
||||
Note: to see the 2 controls above displayed, you will need to load the "Windows To Go.iso" image from
|
||||
https://github.com/pbatard/rufus/raw/master/res/localization/Windows%20To%20Go.iso (356 KB)
|
||||
Also see the comment for IDC_WINDOWS_TO_GO in the English translation.
|
||||
- *NEW* MSG_096 "The file system currently selected can not be used with this type of ISO (...)"
|
||||
- *NEW* MSG_097 "'Windows To Go' can only be applied if the file system is NTFS."
|
||||
- *NEW* MSG_098 "IMPORTANT: You are trying to install 'Windows To Go', but your target drive doesn't (...)"
|
||||
- *NEW* MSG_116 "This image uses Grub %s but the application only includes the installation files for (...)"
|
||||
Similar to MSG_114. Please see the comment from the English translation if you want to test this message.
|
||||
- *NEW* MSG_190 "Incompatible drive detected"
|
||||
- *NEW* MSG_191 "Write pass"
|
||||
- *NEW* MSG_192 "Read pass"
|
||||
See MSG_235 for where the 2 messages above are being used.
|
||||
- *NEW* MSG_193 "Downloaded %s"
|
||||
- *NEW* MSG_194 "Could not download %s"
|
||||
- *NEW* MSG_195 "Using embedded version of %s file(s)"
|
||||
- *NEW* MSG_196 "IMPORTANT: THIS DRIVE USES A NONSTANDARD SECTOR SIZE!! (...)"
|
||||
- *NEW* MSG_197 "Nonstandard sector size detected"
|
||||
- *NEW* MSG_198 "'Windows To Go' can only be installed on a GPT partitioned drive if it has (...)"
|
||||
- *NEW* MSG_199 "Choose this if you plan to install Windows, to another disk, using (...)"
|
||||
- *NEW* MSG_200 "Choose this if you want to run Windows directly from the selected device."
|
||||
- Changed MSG_205 "Using ISO: %s" -> "Using image: %s"
|
||||
- Changed MSG_210 "DONE" -> "READY".
|
||||
This message appears in the new Info field that was added to Rufus 2.0 and reflects
|
||||
when the application is ready to take an action from the user.
|
||||
- Changed MSG_235 "Bad Blocks: PASS %d/%d - %0.2f%% (%d/%d/%d errors)" -> "Bad Blocks: %s %d/%d - %0.2f%% (%d/%d/%d errors)"
|
||||
Basically "PASS" will be replaced by "Write pass" or "Read pass" from MSG_191/192 (printed in place of the '%s')
|
||||
- Changed MSG_253 "Fixed disks detection" -> "Hard disk detection"
|
||||
- *NEW* MSG_264 "Deleting directory '%s'"
|
||||
- *NEW* MSG_265 "VMWare disk detection"
|
||||
- *NEW* MSG_266 "Dual UEFI/BIOS mode"
|
||||
- *NEW* MSG_267 "Applying Windows image: %0.1f%% completed"
|
||||
- *NEW* MSG_268 "Applying Windows image..."
|
||||
|
||||
o Version 1.0.16 (2015.02.03)
|
||||
- Removed MSG_096 - MSG_098
|
||||
Note: since this doesn't require translator involvement, I have applied the changes to existing translations.
|
||||
|
||||
o Version 1.0.15 (2015.01.23)
|
||||
- IDD_ISO_EXTRACT dialog and associated translations have been removed
|
||||
Note: since this doesn't require translator involvement, I have applied the changes to existing translations.
|
||||
|
||||
o Version 1.0.14 (2014.11.27)
|
||||
- Updated translations for the new 2.0 UI font and layout.
|
||||
Note: since this doesn't require translator involvement, I have applied the changes to existing translations.
|
||||
|
||||
o Version 1.0.13 (2014.11.14)
|
||||
- Changed MSG_104 "Syslinux v5.0 or later requires a '%s' file to be installed.\n"
|
||||
"Because this file is more than 100 KB in size, and always present on Syslinux v5+ ISO images (...)"
|
||||
-> "%s or later requires a '%s' file to be installed.\n"
|
||||
"Because this file is more than 100 KB in size, and always present on %s ISO images (...)"
|
||||
Note: since this doesn't require translator involvement, I have applied the change to existing translations.
|
||||
|
||||
o Version 1.0.12 (2014.05.19)
|
||||
- *NEW* MSG_079 "The device is not ready."
|
||||
- *NEW* MSG_189 "This ISO image is not compatible with the selected filesystem"
|
||||
- *NEW* MSG_262 "ISO Support" (If you want to know what it's about, see comment in English translation)
|
||||
- *NEW* MSG_263 "Use PROPER size units" (If you want to know what it's about, see comment from English translation)
|
||||
- Changed MSG_165 "Click to select an ISO..." -> "Click to select an image..."
|
||||
|
||||
o Version 1.0.11 (2014.03.29)
|
||||
- Changed MSG_011 "%u bad block(s) found" -> "%d bad block(s) found"
|
||||
Note: since this doesn't require translator involvement, I have applied the change to existing translations.
|
||||
|
||||
o Version 1.0.10 (2014.02.09)
|
||||
- *NEW* MSG_095 "DD Image"
|
||||
- *NEW* MSG_261 "Writing image: %0.1f%% completed"
|
||||
- *NEW* MSG_187 "Invalid image for selected boot option"
|
||||
- *NEW* MSG_188 "The current image doesn't match the boot option selected..." (see rufus.loc for full text)
|
||||
- Changed MSG_086 "No ISO image selected" -> "No image selected"
|
||||
- Changed MSG_087 "Please click on the disc button to select a bootable ISO..." -> "Please click on the disc button to select a bootable image..." (see rufus.loc for full text)
|
||||
- Changed MSG_088 "ISO too big" -> "Image is too big"
|
||||
- Changed MSG_089 "This ISO image is too big for the selected target." -> "The image is too big for the selected target."
|
||||
- Changed MSG_202 "Scanning ISO image..." -> "Scanning image..."
|
||||
- Changed MSG_203 "Failed to scan ISO image" -> "Failed to scan image"
|
||||
|
||||
o Version 1.0.9 (2014.01.31)
|
||||
- *NEW* MSG_260 "NTFS compression"
|
||||
Note: Since this is a cheat-mode message, I don't specially care if it gets translated for the next version
|
||||
|
||||
o Version 1.0.8 (2014.01.21)
|
||||
- Changed MSG_047 "%s (%c:)" -> "Multiple Volumes" (non-updated ones have been commented out)
|
||||
- *NEW* MSG_093 "IMPORTANT: THIS DRIVE CONTAINS MULTIPLE PARTITIONS OR VOLUMES!!"
|
||||
- *NEW* MSG_094 "Multiple partitions detected"
|
||||
- *NEW* MSG_114 "This image uses Syslinux %s but this application only includes the installation files for Syslinux %s."
|
||||
- *NEW* MSG_115 "Download required"
|
||||
- Changed MSG_234: 'v%d' is replaced with '%s' (change already applied to existing translations)
|
||||
|
||||
o Version 1.0.7 (2014.01.01)
|
||||
- Added MSG_092 again
|
||||
- Added English example for OK button in About box (IDOK)
|
||||
|
||||
o Version 1.0.6 (2013.12.17)
|
||||
- Removed IDD_MESSAGES (and the need for 'g IDD_MESSAGES')
|
||||
|
||||
o Version 1.0.5 (2013.12.11)
|
||||
- Removed MSG_092 to MSG_094
|
||||
|
||||
o Version 1.0.4 (2013.12.02)
|
||||
- MSG_033 -> MSG_031
|
||||
- MSG_031 -> MSG_032
|
||||
- MSG_032 -> MSG_033
|
||||
|
||||
o Version 1.0.3 (2013.11.15)
|
||||
- IDC_ENABLE_FIXED_DISKS "List non removable or unpartitioned USB disks" -> "List USB Hard Drives"
|
||||
- MSG_170 "Enable detection for disks not normally detected by Rufus" -> "Enable the listing of USB Hard Drive enclosures"
|
||||
|
||||
o Version 1.0.2 (2013.10.30)
|
||||
- *NEW* MSG_110 "MS-DOS cannot boot from a drive using a 64 kilobyte Cluster size..."
|
||||
- *NEW* MSG_111 "Incompatible Cluster size"
|
||||
- *NEW* MSG_112 "Formatting a large UDF volumes can take a lot of time..."
|
||||
- *NEW* MSG_113 "Large UDF volume"
|
||||
- *NEW* MSG_220 "Formatting (%s) - estimated duration %d:%02d..."
|
||||
- *NEW* MSG_207 "New Volume"
|
||||
|
||||
o Version 1.0.1 (2013.10.28)
|
||||
- MSG_061 "Please insert a media in drive." -> "Please insert a removable media in drive."
|
||||
- MSG_071 "Unable to create formatting thread." -> "Unable to start thread."
|
||||
|
||||
o Version 1.0.0 (2013.10.20)
|
||||
- Initial version
|
16
res/loc/Makefile.am
Normal file
16
res/loc/Makefile.am
Normal file
|
@ -0,0 +1,16 @@
|
|||
all-local: embedded.loc
|
||||
|
||||
BUILT_SOURCES = embedded.loc
|
||||
noinst_PROGRAMS =
|
||||
noinst_EXES =
|
||||
|
||||
AM_V_SED_0 = @echo " SED $<";$(SED)
|
||||
AM_V_SED_1 = $(SED)
|
||||
AM_V_SED_ = $(AM_V_SED_$(AM_DEFAULT_VERBOSITY))
|
||||
AM_V_SED = $(AM_V_SED_$(V))
|
||||
|
||||
embedded.loc: rufus.loc
|
||||
$(AM_V_SED) -f embedded.sed $< > $@
|
||||
|
||||
clean-local:
|
||||
-rm -rf embedded.loc
|
377
res/loc/Makefile.in
Normal file
377
res/loc/Makefile.in
Normal file
|
@ -0,0 +1,377 @@
|
|||
# Makefile.in generated by automake 1.14.1 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
VPATH = @srcdir@
|
||||
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
|
||||
am__make_running_with_option = \
|
||||
case $${target_option-} in \
|
||||
?) ;; \
|
||||
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||
"target option '$${target_option-}' specified" >&2; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
has_opt=no; \
|
||||
sane_makeflags=$$MAKEFLAGS; \
|
||||
if $(am__is_gnu_make); then \
|
||||
sane_makeflags=$$MFLAGS; \
|
||||
else \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
bs=\\; \
|
||||
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||
esac; \
|
||||
fi; \
|
||||
skip_next=no; \
|
||||
strip_trailopt () \
|
||||
{ \
|
||||
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||
}; \
|
||||
for flg in $$sane_makeflags; do \
|
||||
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||
case $$flg in \
|
||||
*=*|--*) continue;; \
|
||||
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||
-*I?*) strip_trailopt 'I';; \
|
||||
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||
-*O?*) strip_trailopt 'O';; \
|
||||
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||
-*l?*) strip_trailopt 'l';; \
|
||||
-[dEDm]) skip_next=yes;; \
|
||||
-[JT]) skip_next=yes;; \
|
||||
esac; \
|
||||
case $$flg in \
|
||||
*$$target_option*) has_opt=yes; break;; \
|
||||
esac; \
|
||||
done; \
|
||||
test $$has_opt = yes
|
||||
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
noinst_PROGRAMS =
|
||||
subdir = res/loc
|
||||
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
PROGRAMS = $(noinst_PROGRAMS)
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
depcomp =
|
||||
am__depfiles_maybe =
|
||||
SOURCES =
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AM_CFLAGS = @AM_CFLAGS@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
AM_LDFLAGS = @AM_LDFLAGS@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EXEEXT = @EXEEXT@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
RM = @RM@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
SUFFIX = @SUFFIX@
|
||||
VERSION = @VERSION@
|
||||
VISIBILITY_CFLAGS = @VISIBILITY_CFLAGS@
|
||||
WINDRES = @WINDRES@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build_alias = @build_alias@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host_alias = @host_alias@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
BUILT_SOURCES = embedded.loc
|
||||
noinst_EXES =
|
||||
AM_V_SED_0 = @echo " SED $<";$(SED)
|
||||
AM_V_SED_1 = $(SED)
|
||||
AM_V_SED_ = $(AM_V_SED_$(AM_DEFAULT_VERBOSITY))
|
||||
AM_V_SED = $(AM_V_SED_$(V))
|
||||
all: $(BUILT_SOURCES)
|
||||
$(MAKE) $(AM_MAKEFLAGS) all-am
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign --ignore-deps res/loc/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign --ignore-deps res/loc/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
|
||||
clean-noinstPROGRAMS:
|
||||
-test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
|
||||
tags TAGS:
|
||||
|
||||
ctags CTAGS:
|
||||
|
||||
cscope cscopelist:
|
||||
|
||||
check-am: all-am
|
||||
check: $(BUILT_SOURCES)
|
||||
$(MAKE) $(AM_MAKEFLAGS) check-am
|
||||
all-am: Makefile $(PROGRAMS) all-local
|
||||
installdirs:
|
||||
install: $(BUILT_SOURCES)
|
||||
$(MAKE) $(AM_MAKEFLAGS) install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-local clean-noinstPROGRAMS \
|
||||
mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-generic
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am:
|
||||
|
||||
.MAKE: all check install install-am install-strip
|
||||
|
||||
.PHONY: all all-am all-local check check-am clean clean-generic \
|
||||
clean-local clean-noinstPROGRAMS cscopelist-am ctags-am \
|
||||
distclean distclean-generic dvi dvi-am html html-am info \
|
||||
info-am install install-am install-data install-data-am \
|
||||
install-dvi install-dvi-am install-exec install-exec-am \
|
||||
install-html install-html-am install-info install-info-am \
|
||||
install-man install-pdf install-pdf-am install-ps \
|
||||
install-ps-am install-strip installcheck installcheck-am \
|
||||
installdirs maintainer-clean maintainer-clean-generic \
|
||||
mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags-am \
|
||||
uninstall uninstall-am
|
||||
|
||||
all-local: embedded.loc
|
||||
|
||||
embedded.loc: rufus.loc
|
||||
$(AM_V_SED) -f embedded.sed $< > $@
|
||||
|
||||
clean-local:
|
||||
-rm -rf embedded.loc
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
21
res/loc/embedded.sed
Normal file
21
res/loc/embedded.sed
Normal file
|
@ -0,0 +1,21 @@
|
|||
# This sed script removes everything we don't need from rufus.loc, for embedding.
|
||||
|
||||
# remove comments (but not so aggressively as to drop the end of MSG_298!)
|
||||
s/^#.*$//
|
||||
s/[ \t]#.*$//
|
||||
|
||||
# remove empty lines
|
||||
/^$/d
|
||||
|
||||
# remove trailing whitespaces
|
||||
s/[ \t]*$//
|
||||
|
||||
# remove the UI controls for "en-US" as they are just here for translators
|
||||
# 1,300 means we only do this for the the first 300 lines
|
||||
1,300 {/^g IDD_DIALOG/,/^t MSG_001/{/^t MSG_001/!d}}
|
||||
|
||||
# also replace the "translated by" line for English
|
||||
1,500{s/^t MSG_176.*$/t MSG_176 \"mailto:pete@akeo.ie\"/}
|
||||
|
||||
# output file *MUST* be CR/LF
|
||||
s/$/\r/
|
1244
res/loc/pollock/Pollock.cs
Normal file
1244
res/loc/pollock/Pollock.cs
Normal file
File diff suppressed because it is too large
Load diff
49
res/loc/pollock/Pollock.csproj
Normal file
49
res/loc/pollock/Pollock.csproj
Normal file
|
@ -0,0 +1,49 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{759D557D-FA9B-4EE2-A6B3-3D30FC35F3CE}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>pollock</RootNamespace>
|
||||
<AssemblyName>pollock</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Pollock.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
25
res/loc/pollock/Pollock.sln
Normal file
25
res/loc/pollock/Pollock.sln
Normal file
|
@ -0,0 +1,25 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.27703.2035
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Pollock", "Pollock.csproj", "{759D557D-FA9B-4EE2-A6B3-3D30FC35F3CE}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{759D557D-FA9B-4EE2-A6B3-3D30FC35F3CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{759D557D-FA9B-4EE2-A6B3-3D30FC35F3CE}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{759D557D-FA9B-4EE2-A6B3-3D30FC35F3CE}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{759D557D-FA9B-4EE2-A6B3-3D30FC35F3CE}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {E598CE39-98F7-4F0F-BF91-3C29C30919F9}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
16040
res/loc/rufus.loc
Normal file
16040
res/loc/rufus.loc
Normal file
File diff suppressed because it is too large
Load diff
BIN
res/loc/test/arch_trunc.iso
Normal file
BIN
res/loc/test/arch_trunc.iso
Normal file
Binary file not shown.
BIN
res/loc/test/casper_test.iso
Normal file
BIN
res/loc/test/casper_test.iso
Normal file
Binary file not shown.
BIN
res/loc/test/menu_c32_test.iso
Normal file
BIN
res/loc/test/menu_c32_test.iso
Normal file
Binary file not shown.
BIN
res/loc/test/windows_to_go.iso
Normal file
BIN
res/loc/test/windows_to_go.iso
Normal file
Binary file not shown.
181
res/loc/translation_check.py
Normal file
181
res/loc/translation_check.py
Normal file
|
@ -0,0 +1,181 @@
|
|||
#! /usr/bin/env python3
|
||||
# -*- coding=utf-8 -*-
|
||||
|
||||
# LIMITATIONS
|
||||
# this script was written as fast as possible so it is broken/minimalistic:
|
||||
# it assumes the first language in rufus.loc in English
|
||||
# written for 1.0.23, things may have changes since then
|
||||
# horrible code below
|
||||
# in multiline messages checks only first one if is the same as in English (should be enough for now)
|
||||
|
||||
import sys
|
||||
# regex
|
||||
import re
|
||||
# splitting by "quotes"
|
||||
import shlex
|
||||
# pretty print for debug
|
||||
import pprint
|
||||
|
||||
# global variables, I'm no python expert so I'll just dump everything here
|
||||
languages = []
|
||||
unavailable = []
|
||||
untranslated = []
|
||||
version = "0.0.0"
|
||||
ignored_messages = ['IDOK', 'MSG_020', 'MSG_021', 'MSG_022', 'MSG_023', 'MSG_024', 'MSG_025', 'MSG_026', 'MSG_027', 'MSG_028', 'MSG_118']
|
||||
|
||||
class Language:
|
||||
code = "xx-XX"
|
||||
name = "None"
|
||||
version = "0.0.0"
|
||||
base = "en-US"
|
||||
groups = {}
|
||||
#{ "group" => { "MNEMONIC => "transl" }, group2 = (...) }
|
||||
def __init__(self):
|
||||
self.groups = {}
|
||||
|
||||
def get_current_group(self):
|
||||
if len(self.groups) > 0:
|
||||
return list(self.groups.keys())[len(self.groups)-1]
|
||||
else:
|
||||
return "none"
|
||||
def get_current_message(self):
|
||||
current_group = self.get_current_group()
|
||||
if len(self.groups[current_group]) > 0:
|
||||
return list(self.groups[current_group].keys())[len(self.groups[current_group])-1]
|
||||
else:
|
||||
return "none"
|
||||
|
||||
|
||||
def print_no_new(data):
|
||||
print(data, end="")
|
||||
|
||||
def load_languages():
|
||||
print_no_new("loading rufus.loc file...\t")
|
||||
sys.stdout.flush()
|
||||
#load file
|
||||
lines = [line.strip() for line in open("rufus.loc", "r", encoding="utf8")]
|
||||
|
||||
# remove comments
|
||||
#TODO properly remove comments, now it'll break messages with "#" in them, I just assumes there aren't any
|
||||
#lines = [re.sub(re.compile("#(.*)?" ) ,"" ,line) for line in lines]
|
||||
# remove empty lines
|
||||
#lines = filter(None, lines)
|
||||
|
||||
i = -1
|
||||
exceptions = []
|
||||
for index, line in enumerate(lines):
|
||||
try:
|
||||
if line != "" and line[0] != "#":
|
||||
if line[0] == "l":
|
||||
#this is language declaration
|
||||
i += 1
|
||||
temp_language = Language()
|
||||
temp_language.name = shlex.split(line)[2]
|
||||
temp_language.code = shlex.split(line)[1]
|
||||
languages.append(temp_language)
|
||||
# print("current language: "+languages[i].name)
|
||||
|
||||
elif line[0] == "v":
|
||||
#this is language declaration
|
||||
version = line.split(" ")[1]
|
||||
languages[i].version = line.split(" ")[1]
|
||||
elif line[0] == "b":
|
||||
languages[i].base = shlex.split(line)[1]
|
||||
if line != "b \"en-US\"":
|
||||
print(languages[i].name + " is based on another translation: " + languages[i].base)
|
||||
elif line[0] == "g":
|
||||
languages[i].groups[shlex.split(line)[1]] = {}
|
||||
# print("current group: "+languages[i].get_current_group())
|
||||
elif line[0] == "t":
|
||||
pass
|
||||
try:
|
||||
temp_translation = shlex.split(line) #errors
|
||||
except ValueError as err:
|
||||
exceptions.append(str(err)+" in line "+ str(index+1)+": "+line)
|
||||
languages[i].groups[languages[i].get_current_group()][temp_translation[1]] = temp_translation[2]
|
||||
#print("cur transl: "+languages[i].get_current_message())
|
||||
elif line[0] == "\"":
|
||||
pass
|
||||
elif line[0] == "a":
|
||||
pass #only RTL indication as for now
|
||||
else:
|
||||
raise Exception("unknown line "+str(index+1)+ ": "+line)
|
||||
except Exception as error:
|
||||
exceptions.append("Error: "+ repr(error))
|
||||
|
||||
|
||||
if len(exceptions) > 0:
|
||||
print("[WARNING]")
|
||||
print("\n".join(exceptions))
|
||||
else:
|
||||
print("[OK]")
|
||||
print()
|
||||
print ("Found " + str(len(languages)) + " languages")
|
||||
version = languages[0].version
|
||||
print("Assuming " + version + " is the latest version. Only languages with this version will be checked...")
|
||||
#comment if you want to check every single language, not only newest versions
|
||||
languages[:] = [language for language in languages if language.version==version]
|
||||
print (str(len(languages)) + " languages in " + languages[0].version + " version:")
|
||||
print ("\n".join(language.name for language in languages))
|
||||
print()
|
||||
|
||||
def check_unavailable():
|
||||
print_no_new("Checking for possible missing messages...\t")
|
||||
sys.stdout.flush()
|
||||
#for groups in english
|
||||
#every lang
|
||||
#does group exist
|
||||
#for strings in groups
|
||||
#does it exist
|
||||
for group in languages[0].groups:
|
||||
for language in languages[1::]:
|
||||
if group not in language.groups:
|
||||
unavailable.append("Language " + language.name + " is missing group '" + group + "'")
|
||||
else:
|
||||
for string in languages[0].groups[group]:
|
||||
if string not in language.groups[group] and string not in ignored_messages:
|
||||
unavailable.append("Language " + language.name + " is missing message '" + string + "'")
|
||||
# print output
|
||||
if len(unavailable) > 0:
|
||||
print("[WARNING]")
|
||||
print("Possible missing messages:")
|
||||
print("\n".join(unavailable))
|
||||
else:
|
||||
print("[OK]")
|
||||
print()
|
||||
|
||||
def check_untranslated():
|
||||
print_no_new("Checking for possible untranslated messages...\t")
|
||||
sys.stdout.flush()
|
||||
#evyerything but english
|
||||
#for group
|
||||
#for string
|
||||
#transl==english?
|
||||
for language in languages[1::]:
|
||||
for group in language.groups:
|
||||
for string in language.groups[group]:
|
||||
try:
|
||||
if language.groups[group][string] == languages[0].groups[group][string] and string not in ignored_messages:
|
||||
untranslated.append("Language " + language.name + ": message '" + string + "' has the same translation as English")
|
||||
except KeyError as error:
|
||||
untranslated.append("Language " + language.name + ": message '" + string + "' doesn't exist in English")
|
||||
# print output
|
||||
if len(untranslated) > 0:
|
||||
print("[WARNING]")
|
||||
print("Possible untranslated messages:")
|
||||
print("\n".join(untranslated))
|
||||
else:
|
||||
print("[OK]")
|
||||
print()
|
||||
|
||||
def main():
|
||||
print("Rufus translation helper tool, proof of concept/MVP")
|
||||
load_languages()
|
||||
#pp = pprint.PrettyPrinter(indent=4)
|
||||
#pp.pprint(languages[2].groups)
|
||||
check_unavailable()
|
||||
check_untranslated()
|
||||
|
||||
#load main only in ran as stand-alone script
|
||||
if __name__ == "__main__":
|
||||
main()
|
Loading…
Add table
Add a link
Reference in a new issue