forked from radareorg/radare2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial implementation of the sys/translate.sh
- Add initial Catalan language support
- Loading branch information
Showing
4 changed files
with
82 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
s,Usage:,Ús:, | ||
s,patch],pegat], | ||
s,file],fitxer], | ||
s,file|,fitxer|, | ||
s,run script file,executa script, | ||
s,before the file is opened,abans que el fitxer s'hagi obert, | ||
s,show help message,mostra l'ajuda, | ||
s,display variable,mostra les variables i els seus valors, | ||
s,evaluate config var,evalua variable de configuració, | ||
s,block size = file size,el tamany de bloc és igual al del fitxer, | ||
s,load plugin file,carrega extensió, | ||
s,quiet mode,mode sigilós, | ||
s,list supported IO plugins,llista les extensions d'IO, | ||
s,do not load user settings and scripts,ignorar la configuració d'usuari i altres scripts d'inici, | ||
s,do not load RBin info,no carregar les capçaleres del binari, | ||
s,do not demangle symbol names,no resoldre els símbols, | ||
s,map file at given address,mapejar fitxer en aquesta adreça, | ||
s,run radare2 without opening any file,executar r2 sense obrir cap fitxer, | ||
s,execute radare command,executa una comanda de r2, | ||
s,force to use that rbin plugin,força l'ús d'una especifica extensió d'rbin, | ||
s,start r2 in sandbox mode,arrenca r2 en mode sandbox, | ||
s,perform sdb query into,realitza una petició sdb, | ||
s,enable debug mode,habilita el mode de depuració, | ||
s,set asm.arch,defineix asm.arch, | ||
s,set asm.bits,defineix asm.bits, | ||
s,set asm.os,defineix asm.os, | ||
s,initial seek,adreça inicial, | ||
s,specify rarun2 profile to load (same as,especifica un perfil de rarun2 (el mateix que, | ||
s/use project, list if no arg, load if no file/utilitza aquest project, llista els projects sense argument/ | ||
s,load rabin2 info in thread,carrega la informació del binari en un fil, | ||
s,read file from stdin,llegeix continguts del fitxer desde l'stdin, | ||
s,set base address for PIE binaries,define adreça base per rebasejar binaries PIE, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#!/bin/sh | ||
if [ -z "$1" ]; then | ||
echo "Usage: sys/translate.sh [--reset] [lang|path]" | ||
cd sys/lang && ls | ||
exit 1 | ||
fi | ||
|
||
if [ "$1" = "--reset" ]; then | ||
RESET=1 | ||
shift | ||
else | ||
RESET=0 | ||
fi | ||
|
||
if [ -d "$1" ]; then | ||
: | ||
else | ||
if [ -d "sys/lang/$1" ]; then | ||
L="sys/lang/$1" | ||
else | ||
if [ -d "$1" ]; then | ||
L="$1" | ||
else | ||
echo "Invalid language" | ||
exit 1 | ||
fi | ||
fi | ||
fi | ||
|
||
echo | ||
echo "WARNING: Translations are experimental and can only be changed at compile time" | ||
echo "WARNING: Everyone is welcome to submit their translation efforts. I have no plans" | ||
echo "WARNING: to support runtime language selection, because of the unnecessary overhead" | ||
echo | ||
|
||
for a in `cd "$L" && echo *` ; do | ||
F=`echo $a | sed -e s,_,/,g` | ||
echo "Processing $F" | ||
git checkout "$F" | ||
if [ "${RESET}" = 0 ]; then | ||
sed -f "$L/$a" < "$F" > .tmp | ||
if [ $? = 0 ]; then | ||
mv .tmp $F | ||
else | ||
echo "Failed" | ||
fi | ||
fi | ||
done |