1
0
mirror of https://github.com/j-a-n/raspberrymatic-addon-rmupdate.git synced 2023-10-10 11:37:40 +00:00

Localization

This commit is contained in:
Jan Schneider
2018-01-23 00:34:09 +01:00
parent 6bb72481c3
commit c350b05664
4 changed files with 206 additions and 77 deletions

View File

@@ -41,6 +41,7 @@ proc process {} {
return [rmupdate::get_addon_info 1 1 1]
} elseif {[lindex $path 1] == "start_install_firmware"} {
regexp {\"version\"\s*:\s*\"([\d\.]+)\"} $data match version
regexp {\"language\"\s*:\s*\"([^\"]+)\"} $data match lang
regexp {\"reboot\"\s*:\s*(true|false)} $data match reboot
regexp {\"dryrun\"\s*:\s*(true|false)} $data match dryrun
if { [info exists version] && $version != "" } {
@@ -60,7 +61,7 @@ proc process {} {
} else {
set dryrun 0
}
return "\"[rmupdate::install_firmware_version $version $reboot $dryrun]\""
return "\"[rmupdate::install_firmware_version $version $lang $reboot $dryrun]\""
} else {
error "Invalid version: ${data}"
}