-
-
Notifications
You must be signed in to change notification settings - Fork 53
Language File
A Language file is a YAML file containing a known set of keys which specifies the strings to use for various parts of the UI.
To enable multi-language support, WARP makes use of these files. A template for this file has been provided in the 'Languages' folder.
The quickest way to start writing your own language file is to copy the template and edit that.
- Overview
- Imports
- Global keys
- Tab names
- Dialog titles
- Action texts
- MessageBox texts
- Other texts
- Translations
All the keys & sections being mentioned below are optional.
For any missing keys in the file, the tool will pick up the corresponding value from the inbuilt database.
Currently, a language file has 7 sections in total as explained below
You can make use of the include
key to import additional entries from other files into the current language file as shown below.
include:
- <YAML file1>
- <YAML file2>
...
This process is recursive, so you can keep a good hierarchy rather than 1 single bloated file for specifying the various sections.
Currently, there is only 1 global key.
RTL: yes/no
RTL - Enables Mirroring of content for languages with Right To Left orientation.
These are the list of names used for the 4 tabs in Test Bench. It is specified with the key tabs
as shown below.
tabs:
- Patches
- Extensions
- Testers
- Results
The list is expected to contain 4 names. This means that even to change just 1 name, you still need to specify all 4 (keeping the other 3 same as the default).
This is a map of titles used for the various file & folder dialogs. It is specified using the key dialogs
as shown below.
dialogs:
dir: Choose directory containing test exes
src: Choose source exe file
tgt: Choose target exe file
loadS: Choose session file to load
saveS: Choose session file to save as
All the keys are independent of each other.
By Action we mean either Menu Items , Text Buttons (primarily inside Quick Actions frame) OR [Check Boxes].
Either way both of them need titles as well as tooltip texts. The actions
map is used to define these texts.
actions:
#==============#
# Patches Page #
#==============#
getPatches:
title: Get<br>Patches
tooltip: Fills the Patch List with all defined patches
selVisiblePatches:
title: Select<br>Visible
tooltip: Select all patches currently visible
clearSelPatches:
title: Clear<br>Selected
tooltip: Clear all selected patches
#=================#
# Extensions Page #
#=================#
getExtns:
title: Get<br>Extensions
tooltip: Fills the Extensions List with all defined extensions
selVisibleExtns:
title: Select<br>Visible
tooltip: Select all extensions currently visible
clearSelExtns:
title: Clear<br>Selected
tooltip: Clear all selected extensions
#==============#
# Testers Page #
#==============#
getExes:
title: Get Exes
tooltip: Fills the Exe List with all .exe files found in the Test directory
selVisibleExes:
title: Select<br>Visible
tooltip: Select all exe files currently visible
clearSelExes:
title: Clear<br>Selected
tooltip: Clear all selected exe files
#==============#
# Results Page #
#==============#
runTest:
title: Run Test
tooltip: Tests the selected patches & extensions on the list of exes selected and outputs to 'Results' tab
#=======================#
# Script Window related #
#=======================#
showScriptWin:
title: Show Script Window
tooltip: Displays (Alt+W) the script window used for quickly testing scripts
#=========================#
# Remaining Quick Actions #
#=========================#
loadSrcExe:
title: Load<br>Source
tooltip: Load the source exe file (& scripts if not already done)
applyPatches:
title: Apply<br>Patches
tooltip: Apply selected patches on the loaded exe and save as the target file
selectPrev:
title: Select<br>Previous
tooltip: Select all patches which were applied last time
selectRcmd:
title: Select<br>Recommended
tooltip: Select all patches marked as 'recommended'
loadChangedScripts:
title: Load<br>Scripts
tooltip: Load/Reload (Alt+C) all modified (since last loading) .qjs script files coming under 'Patches', 'Support' & 'Extensions' sub-folders inside 'Scripts' directory
clearOutput:
title: Clear
tooltip: Clear the 'Output' view
evalScript:
title: Evaluate
tooltip: Evaluate (Ctrl+R) the script in the Editor & dump the result to the Output
clearEditor:
title: Clear
tooltip: Clear the script editor
#================#
# Filter Options #
#================#
rexBtn:
tooltip: Select whether to use Regular expressions OR glob style matching
csBtn:
tooltip: Select whether to match with or without case-sensitivity
#============#
# Menu Items #
#============#
loadPatchScripts:
title: Load from <b>'Patches'</b>
tooltip: Load/Reload (Alt+P) all the .qjs script files inside 'Scripts/Patches' directory
loadExtnScripts:
title: Load from <b>'Extensions'</b>
tooltip: Load/Reload (Alt+E) all the .qjs script files inside 'Scripts/Extensions' directory
loadSuppScripts:
title: Load from <b>'Support'</b>
tooltip: Load/Reload (Alt+S) all the .qjs script files inside 'Scripts/Support' directory
loadAllScripts:
title: Load <b>All</b> Scripts
tooltip: Load/Reload (Alt+A) all the .qjs script files coming under 'Patches', 'Support' & 'Extensions' sub-folders inside 'Scripts' directory
loadSession:
title: Load Session file
tooltip: Load patch selections and inputs from specified session file
saveSession:
title: Save Session file
tooltip: Save patch selections and inputs to specified session file
refreshLanguages:
title: Refresh Languages
tooltip: Load list of languages provided via .yml files in 'Languages' folder
refreshStyles:
title: Refresh Styles
tooltip: Load list of styles provided via .yml files in 'Styles' folder
loadExtns:
title: Load Extensions
tooltip: Fills the Extension drawer with all the defined extensions
pro2Session:
title: Convert Profile to Session
tooltip: Converts a NEMO profile to a session file for use in WARP
genSecFile:
title: Generate Security File
tooltip: Generates a security file containing various hashes from an input file (may or may not be executable)
#=========================#
# Settings Dialog related #
#=========================#
saveResolution:
title: Save Resolution
tooltip: Saves current resolution of Tester window as the default
keepTestInputs:
title: Keep test inputs
tooltip: Option to keep the previously saved inputs for every test that follows
stopAtError:
title: Stop at Error
tooltip: Option to stop running tests when the first error is encountered
saveResolutions:
title: Save Resolutions
tooltip: Saves current resolutions of Main & Script windows as the default
showVersion:
title: Show loaded version
tooltip: Check it to show the loaded exe's build version along with the date
enableEpi:
title: Enable EPI
tooltip: Enable the generation & loading of EPI files along with corresponding exe files. Use with caution.
genTgtSecure:
title: Generate <target>.secure.txt
tooltip: Enables the generation of security file (.secure.txt) along with the patched Target Exe
genTgtSession:
title: "Generate target's session"
tooltip: Enables the generation of session file (for later use) along with the patched Target Exe
keepInputs:
title: Keep session inputs
tooltip: Option to keep the saved input while loading session files instead of asking one by one
This is a map of various texts used in Message Boxes including the titles. It is specified using the key messages
as shown below.
messages:
#====================#
# Regular Box titles #
#====================#
success: Tool Info
query: Tool Query
warn: Tool Warning
error: Tool Error
#============================#
# Script specific Box titles #
#============================#
errS: Script Error
#===========================#
# Patch specific Box titles #
#===========================#
warnP: "Patch Warning : <b>'%0'</b>"
errP: "Patch Error : <b>'%0'</b>"
#===============================#
# Extension specific Box titles #
#===============================#
infoE: "Extension Info : <b>'%0'</b>"
warnE: "Extension Warning : <b>'%0'</b>"
errE: "Extension Error : <b>'%0'</b>"
#===============#
# Button titles #
#===============#
btnOK: OK
btnCANC: Cancel
btnYES: Yes
btnNO: No
btnLOAD: Load
btnSAVE: Save
btnSEL: Select Current
#===============#
# Error prompts #
#===============#
noAccess: "<b>'%0'</b> is inaccessible"
noWrite: "Unable to open <b>'%0'</b> for writing"
wrongSig: "<b>'%0'</b> signature is invalid"
wrongPE: "PE header not found in <b>'%0'</b>"
need32: "Only 32 bit exes can be used as <b>'%0'</b>"
yamlErr: "YAML parse error (%0) : <b>%1</b>"
evalErr: "Error at line %0 of %1 : <b>%2</b>"
grpErr: "<b>'groups'</b> should be present as an array/sequence"
extErr: "Extensions should provided as an array/sequence"
loadFail: "<b>'%0'</b> loading failed"
callFail: "<b>Patch Function</b> could not be called"
applyFail: "<b>Patches</b> could not be applied"
tgtFail: "<b>Target Exe</b> could not be written"
funcFail: "<b>%0 Function</b> missing or uncallable"
allocFail: "Space allocation failed"
dependFail: "Dependency '<b>%0</b>' could not be selected"
#=================#
# Warning prompts #
#=================#
empty: "<b>'%0'</b> is empty"
noneLoaded: "No Exe has been loaded"
skipWarn: "Certain <b>%0</b> have been skipped due to various reasons (Missing functions, improper syntax etc.)"
retnFalse: "Function returned <b>false</b>"
noExes: "No Exes selected for Testing"
noPatExts: "No Patches or Extensions selected for Testing"
setNoSave: "Setting <b>'%0'</b> could not be saved"
#=================#
# Success prompts #
#=================#
ready: "<b>'%0'</b> loaded successfully"
tgtReady: "Patches have been written to <b>Target Exe</b>"
patSuccess: "Patch is successful"
extnSuccess: "Extension is successful"
#==============#
# Info prompts #
#==============#
patInfo: "Testing Patch : <b>%0</b>"
exeInfo: "Working on <b>'%0'</b>\n"
extnInfo: "Testing Extension : <b>%0</b>"
extnOutput: "<b>Result => %0</b>"
patIgnored: "Patch is ignored for this build date"
userInterrupt: "<b>User interrupted the test</b>"
#===============#
# Query prompts #
#===============#
srcQuery: "Update Target Exe path?"
As before, all the keys are optional. The %0
are placeholders which get replaced with values later.
Make sure to keep those in your own Language files as well.
This is a map of various texts used across the UI for varying purposes (not covered in the previous sections).
Some of the keys are Control Names. It is specified using the key texts
as shown below.
texts:
#================#
# Header Prompts #
#================#
selCount: "Selected Patches"
extnSelCount: "Selected Extensions"
exeSelCount: "Selected Exes"
loadDate: "Loaded Date"
loadVersion: "& Version"
#===========================================#
# StringField titles (appears on the frame) #
#===========================================#
srcEntry: Source
tgtEntry: Target
dirEntry: Test Dir
#===============================#
# StringField placeholder texts #
#===============================#
exePath: Exe Path
filter: Filter Expression
path: Path
find: Search Expression
#==============#
# Frame titles #
#==============#
actionFrame: Quick Actions
patchFrame: Patch List
extnFrame: Extension List
exeFrame: Exe List
fontFrame: Font Names
demoFrame: Demo
choiceFrame: Choices
#====================#
# Text Editor titles #
#====================#
scriptEditor: Script Editor
outputView: Output
#======================#
# Context Menu prompts #
#======================#
cutPrompt: Cut
copyPrompt: Copy
pastePrompt: Paste
delPrompt: Delete
clrPrompt: Clear
undoPrompt: Undo
redoPrompt: Redo
deselPrompt: Deselect
selAllPrompt: Select All
#===============#
# Other prompts #
#===============#
fontSizePrompt: "Font Size :"
fontNamePrompt: "Font Name :"
langPrompt: "Language :"
stylePrompt: "Style :"
And finally, any other type of translations you wish to add can be done in this section.
It is simply a list of pairs of strings to find
and replace
with specified using the key translations
as shown below.
translations:
- find: this
replace: that
- find: this too
replace: that too
# etc.
These translations are utilized by the following items:
- Almost all parts of UI which are not picking up texts from the other sections of the Language file.
- Patch titles, Group titles & descriptions.
- Extension titles & tooltips.
- All type of messages reported from Patches & Extensions.
In case you find some item still not being translated despite setting it up, please report it.