-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Spanish translation Signed-off-by: Pau Escrich <p4u@dabax.net>
- Loading branch information
Showing
19 changed files
with
2,206 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
make -C po2lmo/ po2lmo | ||
mkdir -p luasrc/i18n 2>/dev/null | ||
for l in $(cd po; ls); do | ||
for f in $(cd po/$l; ls *.po); do | ||
b=$(basename -s po po/$l/$f) | ||
./po2lmo/po2lmo po/$l/$f luasrc/i18n/${b}${l}.lmo | ||
done | ||
done |
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,128 @@ | ||
#!/usr/bin/perl | ||
|
||
use strict; | ||
use warnings; | ||
use Text::Balanced qw(extract_bracketed extract_delimited extract_tagged); | ||
|
||
@ARGV >= 1 || die "Usage: $0 <source direcory>\n"; | ||
|
||
|
||
my %stringtable; | ||
|
||
sub dec_lua_str | ||
{ | ||
my $s = shift; | ||
$s =~ s/[\s\n]+/ /g; | ||
$s =~ s/\\n/\n/g; | ||
$s =~ s/\\t/\t/g; | ||
$s =~ s/\\(.)/$1/g; | ||
$s =~ s/^ //; | ||
$s =~ s/ $//; | ||
return $s; | ||
} | ||
|
||
sub dec_tpl_str | ||
{ | ||
my $s = shift; | ||
$s =~ s/-$//; | ||
$s =~ s/[\s\n]+/ /g; | ||
$s =~ s/^ //; | ||
$s =~ s/ $//; | ||
$s =~ s/\\/\\\\/g; | ||
return $s; | ||
} | ||
|
||
|
||
if( open F, "find @ARGV -type f '(' -name '*.htm' -o -name '*.lua' ')' |" ) | ||
{ | ||
while( defined( my $file = readline F ) ) | ||
{ | ||
chomp $file; | ||
|
||
if( open S, "< $file" ) | ||
{ | ||
local $/ = undef; | ||
my $raw = <S>; | ||
close S; | ||
|
||
|
||
my $text = $raw; | ||
|
||
while( $text =~ s/ ^ .*? (?:translate|translatef|i18n|_) [\n\s]* \( /(/sgx ) | ||
{ | ||
( my $code, $text ) = extract_bracketed($text, q{('")}); | ||
|
||
$code =~ s/\\\n/ /g; | ||
$code =~ s/^\([\n\s]*//; | ||
$code =~ s/[\n\s]*\)$//; | ||
|
||
my $res = ""; | ||
my $sub = ""; | ||
|
||
if( $code =~ /^['"]/ ) | ||
{ | ||
while( defined $sub ) | ||
{ | ||
( $sub, $code ) = extract_delimited($code, q{'"}, q{\s*(?:\.\.\s*)?}); | ||
|
||
if( defined $sub && length($sub) > 2 ) | ||
{ | ||
$res .= substr $sub, 1, length($sub) - 2; | ||
} | ||
else | ||
{ | ||
undef $sub; | ||
} | ||
} | ||
} | ||
elsif( $code =~ /^(\[=*\[)/ ) | ||
{ | ||
my $stag = quotemeta $1; | ||
my $etag = $stag; | ||
$etag =~ s/\[/]/g; | ||
|
||
( $res ) = extract_tagged($code, $stag, $etag); | ||
|
||
$res =~ s/^$stag//; | ||
$res =~ s/$etag$//; | ||
} | ||
|
||
$res = dec_lua_str($res); | ||
$stringtable{$res}++ if $res; | ||
} | ||
|
||
|
||
$text = $raw; | ||
|
||
while( $text =~ s/ ^ .*? <% -? [:_] /<%/sgx ) | ||
{ | ||
( my $code, $text ) = extract_tagged($text, '<%', '%>'); | ||
|
||
if( defined $code ) | ||
{ | ||
$code = dec_tpl_str(substr $code, 2, length($code) - 4); | ||
$stringtable{$code}++; | ||
} | ||
} | ||
} | ||
} | ||
|
||
close F; | ||
} | ||
|
||
|
||
if( open C, "| msgcat -" ) | ||
{ | ||
printf C "msgid \"\"\nmsgstr \"Content-Type: text/plain; charset=UTF-8\"\n\n"; | ||
|
||
foreach my $key ( sort keys %stringtable ) | ||
{ | ||
if( length $key ) | ||
{ | ||
$key =~ s/"/\\"/g; | ||
printf C "msgid \"%s\"\nmsgstr \"\"\n\n", $key; | ||
} | ||
} | ||
|
||
close C; | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
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,111 @@ | ||
msgid "" | ||
msgstr "Content-Type: text/plain; charset=UTF-8" | ||
|
||
msgid "About" | ||
msgstr "Sobre" | ||
|
||
msgid "Access Point ESSID (usually name of your network)" | ||
msgstr "ESSID del punto de acceso (normalmente nombre de la red)" | ||
|
||
msgid "Advanced" | ||
msgstr "Avanzado" | ||
|
||
msgid "Channel 2.4 GHz" | ||
msgstr "Canal 2.4GHz" | ||
|
||
msgid "Channel 5 GHz" | ||
msgstr "Canal 5GHz" | ||
|
||
msgid "Community name" | ||
msgstr "Nombre de la comunidad" | ||
|
||
msgid "Contact" | ||
msgstr "Contacto" | ||
|
||
msgid "Contact information" | ||
msgstr "Información de contacto" | ||
|
||
msgid "Country code" | ||
msgstr "Código del país" | ||
|
||
msgid "Country code used for WiFi radios" | ||
msgstr "Código del país usado para las radios WiFi" | ||
|
||
msgid "Default channel used for 2.4 GHz radios" | ||
msgstr "Canal por defecto usado para las radios de 2.4GHz" | ||
|
||
msgid "Default channel used for 5 GHz radios" | ||
msgstr "Canal por defecto usado para las radios de 5GHz" | ||
|
||
msgid "Email" | ||
msgstr "Correo" | ||
|
||
msgid "General" | ||
msgstr "General" | ||
|
||
msgid "Hostname" | ||
msgstr "Nombre de la máquina" | ||
|
||
msgid "Latitude" | ||
msgstr "Latitud" | ||
|
||
msgid "Latitude (this can be also configured in location tab)" | ||
msgstr "Latitud (puede ser configurada también en la sección Localización)" | ||
|
||
msgid "Location" | ||
msgstr "Localización" | ||
|
||
msgid "Logout" | ||
msgstr "Salir" | ||
|
||
msgid "Longitude" | ||
msgstr "Longitud" | ||
|
||
msgid "Longitude (this can be also configured in location tab)" | ||
msgstr "Longitud (puede ser configurada también en la sección Localización)" | ||
|
||
msgid "Main IPv4" | ||
msgstr "Dirección principal IPv4" | ||
|
||
msgid "Main IPv6" | ||
msgstr "Dirección principal IPv6" | ||
|
||
msgid "Map location" | ||
msgstr "Localización en mapa" | ||
|
||
msgid "Mesh BSSID" | ||
msgstr "BSSID de la Mesh" | ||
|
||
msgid "Name" | ||
msgstr "Nombre" | ||
|
||
msgid "Name for this node" | ||
msgstr "Nombre para este nodo" | ||
|
||
msgid "Network SSID" | ||
msgstr "SSID de la red" | ||
|
||
msgid "Simple Config" | ||
msgstr "Configuración simple" | ||
|
||
msgid "The BSSID (WiFi network identifier) used for the mesh network" | ||
msgstr "El BSSID (identificador de la red WiFi) usado para la mesh" | ||
|
||
msgid "" | ||
"The main IPv4 configured for this node, with slash notation (for ex. " | ||
"1.2.3.4/24)" | ||
msgstr "La IPv4 principal para este nodo, con notación de barra (p.e 1.2.3.4/24)" | ||
|
||
msgid "" | ||
"The main IPv6 configured for this node, with slash notation (for ex. 2001:" | ||
"db8::1/64)" | ||
msgstr "La IPv6 principal para este nodo, con notación de barra (p.e 2001:db8::1/64)" | ||
|
||
msgid "The name of your network community" | ||
msgstr "Nombre para la red comunitaria" | ||
|
||
msgid "Your email (not required)" | ||
msgstr "Tu correo electrónico (no obligatorio)" | ||
|
||
msgid "Your name or alias (not required)" | ||
msgstr "Tu nombre o alias (no obligatorio)" |
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,21 @@ | ||
%.o: %.c | ||
$(CC) $(CPPFLAGS) $(CFLAGS) $(FPIC) -c -o $@ $< | ||
|
||
clean: | ||
rm -f po2lmo parser.so version.lua *.o | ||
|
||
po2lmo: po2lmo.o template_lmo.o | ||
$(CC) $(LDFLAGS) -o $@ $^ | ||
|
||
parser.so: template_parser.o template_utils.o template_lmo.o template_lualib.o | ||
$(CC) $(LDFLAGS) -shared -o $@ $^ | ||
|
||
version.lua: | ||
./mkversion.sh $@ $(LUCI_VERSION) "$(LUCI_GITBRANCH)" | ||
|
||
compile: parser.so version.lua | ||
|
||
install: compile | ||
mkdir -p $(DESTDIR)/usr/lib/lua/luci/template | ||
cp parser.so $(DESTDIR)/usr/lib/lua/luci/template/parser.so | ||
cp version.lua $(DESTDIR)/usr/lib/lua/luci/version.lua |
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,24 @@ | ||
#!/bin/sh | ||
|
||
cat <<EOF > $1 | ||
local pcall, dofile, _G = pcall, dofile, _G | ||
module "luci.version" | ||
if pcall(dofile, "/etc/openwrt_release") and _G.DISTRIB_DESCRIPTION then | ||
distname = "" | ||
distversion = _G.DISTRIB_DESCRIPTION | ||
if _G.DISTRIB_REVISION then | ||
distrevision = _G.DISTRIB_REVISION | ||
if not distversion:find(distrevision,1,true) then | ||
distversion = distversion .. " " .. distrevision | ||
end | ||
end | ||
else | ||
distname = "OpenWrt" | ||
distversion = "Development Snapshot" | ||
end | ||
luciname = "${3:-LuCI}" | ||
luciversion = "${2:-Git}" | ||
EOF |
Oops, something went wrong.