mirror of
https://github.com/radareorg/radare2.git
synced 2024-11-27 23:20:40 +00:00
Initial implementation of the sys/translate.sh
- Add initial Catalan language support
This commit is contained in:
parent
152cb4fe50
commit
165304fa1a
2
Makefile
2
Makefile
@ -395,7 +395,7 @@ meson-windows:
|
||||
meson-config meson-cfg meson-conf:
|
||||
# TODO: this is wrong for each platform different plugins must be compiled
|
||||
cp -f plugins.meson.cfg plugins.cfg
|
||||
./configure --prefix=/usr
|
||||
./configure --prefix="${PREFIX}"
|
||||
$(MAKE) libr/include/r_version.h
|
||||
# cp -f libr/config.mk libr/config.mk.meson
|
||||
# cp -f libr/config.h libr/config.h.meson
|
||||
|
@ -139,7 +139,7 @@ static int main_help(int line) {
|
||||
}
|
||||
if (line != 1) {
|
||||
printf (
|
||||
" -- open radare2 on an empty file\n"
|
||||
" -- run radare2 without opening any empty file\n"
|
||||
" - equivalent of 'r2 malloc://512'\n"
|
||||
" = read file from stdin (use -i and -c to run cmds)\n"
|
||||
" -= perform !=! command to run all commands remotely\n"
|
||||
|
32
sys/lang/catalan/binr_radare2_radare2.c
Normal file
32
sys/lang/catalan/binr_radare2_radare2.c
Normal file
@ -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,
|
48
sys/translate.sh
Executable file
48
sys/translate.sh
Executable file
@ -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
|
Loading…
Reference in New Issue
Block a user