From 07c1d86ac09903f5924e9248c5fc1b891a2de554 Mon Sep 17 00:00:00 2001 From: dg9vh Date: Thu, 23 Mar 2017 19:40:34 +0000 Subject: [PATCH] changes related to https://github.com/dg9vh/MMDVMHost-Dashboard/issues/130 and added missing strings into internationalisations... --- config/networks.php | 21 + include/tools.php | 10 + index.php | 47 +- locale/da_DK/LC_MESSAGES/messages.po | 8 + locale/de_DE/LC_MESSAGES/messages.mo | Bin 11508 -> 11674 bytes locale/de_DE/LC_MESSAGES/messages.po | 8 + locale/en_GB/LC_MESSAGES/messages.po | 735 +++++++++++++++++++++++++-- locale/es_ES/LC_MESSAGES/messages.po | 8 + locale/pl_PL/LC_MESSAGES/messages.po | 8 + locale/pt_PT/LC_MESSAGES/messages.po | 8 + locale/ru_RU/LC_MESSAGES/messages.po | 8 + locale/sv_SE/LC_MESSAGES/messages.po | 10 +- messages.pot | 8 + scripts/switchnetwork.php | 30 +- setup.php | 4 + switching-networks.md | 6 +- version.php | 2 +- 17 files changed, 853 insertions(+), 68 deletions(-) create mode 100644 config/networks.php diff --git a/config/networks.php b/config/networks.php new file mode 100644 index 0000000..f001558 --- /dev/null +++ b/config/networks.php @@ -0,0 +1,21 @@ + diff --git a/include/tools.php b/include/tools.php index ed6eff8..3e788ef 100644 --- a/include/tools.php +++ b/include/tools.php @@ -123,4 +123,14 @@ function encode($hex) { else return ""; } + +function recursive_array_search($needle,$haystack) { + foreach($haystack as $key=>$value) { + $current_key=$key; + if($needle===$value OR (is_array($value) && recursive_array_search($needle,$value) !== false)) { + return $current_key; + } + } + return false; +} ?> diff --git a/index.php b/index.php index d4a1e69..987e979 100644 --- a/index.php +++ b/index.php @@ -22,6 +22,8 @@ bindtextdomain('messages', dirname(__FILE__).'/locale/'); setlocale(LC_ALL, LANG_LOCALE.'.'.$codeset); textdomain('messages'); + +include("config/networks.php"); include "include/tools.php"; startStopwatch(); showLapTime("Start of page"); @@ -69,24 +71,37 @@ include "version.php"; ?>:

MMDVMHost by G4KLX Version:
Firmware: 0 ) { - echo "
"; - echo _("DMR-Network: ").getDMRNetwork(); + if (defined("JSONNETWORK")) { + $key = recursive_array_search(getDMRNetwork(),$networks); + $network = $networks[$key]; + echo "
"; + echo _("Configuration").": ".$network['label']; + + } else { + if (strlen(getDMRNetwork()) > 0 ) { + echo "
"; + echo _("DMR-Network: ").getDMRNetwork(); + } } ?>

'; + foreach ($networks as $network) { + echo ' '; + } + + } else { ?> m&s5`*wl48%+J^J`dx^V?V* zD{-^FAB6n#n)>{$!-dvZ4ZC7}>}4H^8cQas!+dOj3s4VSkLqwMs-wO3{D}Sh1UBXR zS&YOVtRZw7O8+L7MhiaZjp`r`HIp3F17~AZEW&!Y)Vc{Z&_nk8Bh-CYPy@S;uj4JO zjHRLe&(~QuVq^L@+i0kx<4E<*hp0+iK+Wt+q%e!dH}bnhYm z%*XtRz^fRIm6@HM+Ya^p_;Bjaq)d{%Fw&Zex;_J&;e3q8E%y3F)WB|{Dsc}Ttj%at z;tr_m$;f^)X{aUjp!Qk;YH7;6wy_JfCWov?Q6oKu+DxZVugxc@2bE)6yo$rIHXA@| zo`R}CIzEKisFE+ihPVQ$zS)HufcF>;J@71Q0Ov6dKSw>V8sAbSYM@Hm6q&5)j1CS! z#$Yl~1D=O^@FG-4t5BuhiCW^fPy;)GEREM(rlA|}p&k^zRrEfpg0&s$uNky;{1r$* zo%chPJQ=kYMxjcUjnP<$y1oxJ&{L>^UBF}b73wEPW}<_0P)k~d>UcA1Acws) zv^&qBc6B*wlikHu7}mo7Lz0NPZy>6)HBhqfvXpjT+cu)Gyi&)X0ybmf#%f``@AV$S>$%5Tj4Pwy5W(paz(M zs^C0iKweWyLo?fs>fi`!hUYL5ucHPM+1kHpdZF$gjjWEzMBTs4Uf+qDz}r|2&!axS zXs_Q!?SKKLE-EmkIdth7agQGChUO$O?;AzzB^%<(;8>kB1 zve$#6{S%Bp^%IBH>E9&MXoJ0V0W(mWBnMUMBGimaQA@EKRmwA{0e*v8f}c@qeFycu zKpv{KZiE_GOH_puQ3D%@Uadu{y-;9XY2AbB=zU}orX2GyfHKU)0=$8@@o~J|&iA62 z==T1%U=V5mV^9-vp*CRws$vV5)B=i0dI?85@s@~LY^i%){_ZD)zVQ&ipeIO z*kccFwQcnlF&WME#qG2|xY5lL7c5(FU1LSX%QKdGN^Oq?D+H zI(X&H0MA*jux9~*5(ZNx`OAMyz4K=c;q(C)8H zUM3mj!DBTi?MVR1C*6tOnh> ^yHo+PQh`qSt}7LkRdKS?LqM7zHgnM2Y@#qm-_ z16vcl*A5v^I+2w`M;nq%^p+Kn*GR>&gNEeNsK+OAb~~^iMJPmwY{F@WQ4sCiQ%LtiM7{i;ySXccwDV4?H#wvlb@9{EjKoMO13lAo$GO>q&ZpXPHL9>-&@_zBv)ou{(;pE zmQ@QG^uPxPS~T4l)MaR%XO`=~56bnVcsx#8tmD5s*2!~wTyB%(a&xc8^vTOD4vnsR K;M=IMfPVlAGkm-N delta 3740 zcmYk;d2o$a9LDh@vI>bNH1^zxEVUJhpd^--1QEMbRpQ#ISemG&#VgiQu?4lqmQ=%J zI*n=7Fsbby%_!6Av}3fRWQNWZ6GoZR_WQi|n8}$u_jBI&-uu4i{LXnVdnP@e==>Jp zzr)aulQyIvz?fRBX~YX{N|-SX(TkBd0~=!@Ho>(Rj@vN=k76)ZVkmxtL3jc6z3)+< z{{@>GuBjKXx(1#?k1nuWU2LVLW_zP|?BalRO1@PzdW zzQXZCjOG5uk74Kr@u(Rjqb`_+{x}Sq;YjOr)Bp?Z@fOtQ%1{HVz+?Co`r#z*ruTEK z)36oCvoVzWn^knEy4j4X#17QV_8~T7#;{@7BLjp9|+hnm{wuu?JOw zIMh<6BY$Q%FOFuGL#H|BqX*ZcW>|sU@f>n(^T-;&M$le~!j_nfno$<&dvj3NU4aR> z12w_3s3pB%y%I_Nb>dfh;tp!&50L7ar>Gl*aJ3E?i(0A-)Qu*f-p@lV-8$sYY~`gb zmSZAbL|ykU)c2ntb20wSslQG{F?|__dLs#=aR?^kOnZJWYG9S9id3Tquc1m@XU{id zbnGt^k6O|cjKx&c(s-?T4jrvYp>-K*q(!LBv;pc=KHI8K?r~--D z8hfBho`o%N98ye^hZ;Z;>UvHw9SvYR>O#9v71)nd$$W`S%3MMZ-azhYo}&gD$<=ki zHmDmUqAJ-BwY0-f0~(K7l0~S`ZAPx+m?L!fGpBh`X@5knZSJ6M{2cYg2o`!icEhz; zisvz&otKOE(1Sy{nm%${fU}c z9qLB^pgtGOqoK_fg{nvl>hVlP{>)TfG}D!+%9Wr7Sc#hXX?uJ*n)O$yf93?sY;K@R z^%xVek;ivF2{q76)WEW_8go%UvC%wxI^Q03qmHNnq@b>sj;g?9>vYt_-ivX3BP!s8 zF0dL^x{at!c+h&vdKL9p-9=U6K57Cl(1U*MeM=dOx^V((AgQQLnT4#P@uK#YGf-wRm`Yt&zB<)Op9O)p%GxmbwT@g9z(92wZB6OS0KMD6}EbT=7lM%AdbzK)@I z8$<8`sOvdHMDhuF*>=%cNmL0cYNil1 z9wfJo=Jj2&j0`7Qn!e<7vX{6`>(8&M`x~G&Q~Qt%BC5<9(vzsEbjRGD?_a>d^p_HC z!ZG%I4i?+KDxubmjC6ZEepW4SE^+i|l#+C^k0cXqnvY07l0>?Y?L=)inMqdbfL1`J zyFLD&hin&PAwto1))-w@^X`djF0_kKpA?fE`d(Vq;f zcdTw%z2mp&PbNdi3bKG?kv!s0)OK=z_t~F?sX9YzNfO9B9niXyHl!B`AQi+*-X>GY zBGQ3mllrX@2NOu+`X}knAqU8D;&^yDNXC-6L~T4NaeKbsgU$2@kgj9|nNQM)+NVU5 z(Br38M8b(5*+}Av+E&tpd_iJJ4`K!lE-4Aiu6i1FE4V78#fHGDL+wgKs^%tk3-})Z C*hb<2 diff --git a/locale/de_DE/LC_MESSAGES/messages.po b/locale/de_DE/LC_MESSAGES/messages.po index 04f5df2..1a05ed4 100644 --- a/locale/de_DE/LC_MESSAGES/messages.po +++ b/locale/de_DE/LC_MESSAGES/messages.po @@ -717,3 +717,11 @@ msgstr "YSFGateway läuft nicht" #: include/functions.php:830 msgid "DMRIDs.dat not correct!" msgstr "DMRIDs.dat nicht korrekt!" + +#: index.php:78 +msgid "Configuration" +msgstr "Konfiguration" + +#: setup.php:209 +msgid "Use networks.php instead of configuration below" +msgstr "Nutze networks.php statt d. Konfig. unten" diff --git a/locale/en_GB/LC_MESSAGES/messages.po b/locale/en_GB/LC_MESSAGES/messages.po index 9781c02..5401d87 100644 --- a/locale/en_GB/LC_MESSAGES/messages.po +++ b/locale/en_GB/LC_MESSAGES/messages.po @@ -8,71 +8,720 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-03-13 18:38+0000\n" +"POT-Creation-Date: 2017-03-14 13:47+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: DG9VH \n" +"Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" -"Language: en_GB\n" +"Language: \n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" +"Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -#: index.php:55 +#: include/sysinfo_ajax.php:3 +msgid "System Info" +msgstr "" + +#: include/ysfgatewayinfo.php:5 +msgid "YSFGateway-Infos" +msgstr "" + +#: include/ysfgatewayinfo.php:13 +msgid "YSFGateway Process is running" +msgstr "" + +#: include/ysfgatewayinfo.php:16 +msgid "YSFGateway Process is down!" +msgstr "" + +#: include/ysfgatewayinfo.php:25 +msgid "YSFReflectors reported active" +msgstr "" + +#: include/ysfgatewayinfo.php:37 +msgid "No." +msgstr "" + +#: include/ysfgatewayinfo.php:38 include/localtx_ajax.php:19 +#: include/lh_ajax.php:19 include/txinfo.php:16 +msgid "Name" +msgstr "" + +#: include/ysfgatewayinfo.php:39 +msgid "Description" +msgstr "" + +#: include/ysfgatewayinfo.php:40 +msgid "ID" +msgstr "" + +#: include/ysfgatewayinfo.php:41 +msgid "Connections" +msgstr "" + +#: include/localtx_ajax.php:6 +msgid "Today's local transmissions" +msgstr "" + +#: include/localtx_ajax.php:13 include/lh_ajax.php:13 include/txinfo.php:10 +msgid "Time" +msgstr "" + +#: include/localtx_ajax.php:14 include/lh_ajax.php:14 include/txinfo.php:11 +msgid "Mode" +msgstr "" + +#: include/localtx_ajax.php:15 include/lh_ajax.php:15 include/txinfo.php:12 +msgid "Callsign" +msgstr "" + +#: include/localtx_ajax.php:23 include/lh_ajax.php:23 include/txinfo.php:25 +msgid "DSTAR-ID" +msgstr "" + +#: include/localtx_ajax.php:24 include/lh_ajax.php:24 include/txinfo.php:26 +msgid "Target" +msgstr "" + +#: include/localtx_ajax.php:25 include/lh_ajax.php:25 include/txinfo.php:27 +msgid "Source" +msgstr "" + +#: include/localtx_ajax.php:26 include/lh_ajax.php:26 +msgid "Dur (s)" +msgstr "" + +#: include/localtx_ajax.php:27 include/lh_ajax.php:27 +msgid "Loss" +msgstr "" + +#: include/localtx_ajax.php:28 include/lh_ajax.php:28 +msgid "BER" +msgstr "" + +#: include/localtx_ajax.php:30 +msgid "RSSI (min)" +msgstr "" + +#: include/localtx_ajax.php:31 +msgid "RSSI (max)" +msgstr "" + +#: include/localtx_ajax.php:32 include/localtx_ajax.php:33 +msgid "RSSI (avg)" +msgstr "" + +#: include/repeaterinfo.php:3 +msgid "Repeater Info" +msgstr "" + +#: include/repeaterinfo.php:9 +msgid "Current Mode" +msgstr "" + +#: include/repeaterinfo.php:13 +msgid "D-Star linked to" +msgstr "" + +#: include/repeaterinfo.php:18 +msgid "YSF linked to" +msgstr "" + +#: include/repeaterinfo.php:23 +msgid "DMR TS1 last linked to" +msgstr "" + +#: include/repeaterinfo.php:24 +msgid "DMR TS2 last linked to" +msgstr "" + +#: include/repeaterinfo.php:48 +msgid "Location" +msgstr "" + +#: include/repeaterinfo.php:49 +msgid "TX-Freq." +msgstr "" + +#: include/repeaterinfo.php:50 +msgid "RX-Freq." +msgstr "" + +#: include/repeaterinfo.php:54 +msgid "YSFGateway" +msgstr "" + +#: include/repeaterinfo.php:59 +msgid "DMR CC" +msgstr "" + +#: include/repeaterinfo.php:63 +msgid "DMR-Master" +msgstr "" + +#: include/repeaterinfo.php:64 +msgid "TS1" +msgstr "" + +#: include/repeaterinfo.php:65 +msgid "TS2" +msgstr "" + +#: include/repeaterinfo.php:97 include/repeaterinfo.php:104 +msgid "enabled" +msgstr "" + +#: include/repeaterinfo.php:99 include/repeaterinfo.php:106 +msgid "disabled" +msgstr "" + +#: include/tools.php:73 +msgid "" +"You are using an old config.php. Please configure your Dashboard by calling " +"setup.php!" +msgstr "" + +#: include/tools.php:79 +msgid "" +"You forgot to remove setup.php in root-directory of your dashboard or you " +"forgot to configure it! Please delete the file or configure your Dashboard " +"by calling setup.php!" +msgstr "" + +#: include/modes.php:3 +msgid "Enabled Modes" +msgstr "" + +#: include/lh_ajax.php:6 +msgid "Last Heard List of today's" +msgstr "" + +#: include/lh_ajax.php:6 +msgid "callsigns." +msgstr "" + +#: include/disk.php:3 +msgid "Disk Use" +msgstr "" + +#: include/disk.php:10 +msgid "File System" +msgstr "" + +#: include/disk.php:11 +msgid "Mount Point" +msgstr "" + +#: include/disk.php:12 +msgid "Use" +msgstr "" + +#: include/disk.php:13 +msgid "Free" +msgstr "" + +#: include/disk.php:14 +msgid "Used" +msgstr "" + +#: include/disk.php:15 +msgid "Total" +msgstr "" + +#: include/txinfo.php:3 +msgid "Currently TXing" +msgstr "" + +#: include/txinfo.php:21 +msgid "Talker Alias" +msgstr "" + +#: include/txinfo.php:28 +msgid "TX-Time" +msgstr "" + +#: scripts/rebootmmdvm.php:50 scripts/halt.php:49 scripts/log.php:53 +#: scripts/reboot.php:50 index.php:59 msgid "for" msgstr "" -#: index.php:57 +#: scripts/rebootmmdvm.php:52 scripts/halt.php:51 scripts/log.php:55 +#: scripts/reboot.php:52 index.php:61 msgid "Repeater" msgstr "" -#: index.php:59 +#: scripts/rebootmmdvm.php:54 scripts/halt.php:53 scripts/log.php:57 +#: scripts/reboot.php:54 index.php:63 msgid "Hotspot" msgstr "" -#: index.php:66 -msgid "DMR-Network: " +#: scripts/rebootmmdvm.php:58 scripts/reboot.php:58 +msgid "Home" msgstr "" -#: index.php:96 -msgid "View Log" +#: scripts/rebootmmdvm.php:67 scripts/reboot.php:66 +msgid "Executing" msgstr "" -#: index.php:97 -msgid "Reboot MMDVMHost" +#: scripts/rebootmmdvm.php:67 +msgid "Reboot MMDVMHost service in progress" msgstr "" -#: index.php:98 -msgid "Reboot System" -msgstr "" - -#: index.php:99 -msgid "ShutDown System" -msgstr "" - -#: index.php:104 -msgid "DMRplus" -msgstr "" - -#: index.php:105 -msgid "BrandMeister" -msgstr "" - -#: index.php:155 -msgid "Last Reload" -msgstr "" - -#: index.php:165 -msgid "stop refreshing" -msgstr "" - -#: index.php:167 -msgid "start refreshing" -msgstr "" - -#: index.php:170 +#: scripts/rebootmmdvm.php:90 scripts/halt.php:89 scripts/log.php:134 +#: scripts/reboot.php:89 index.php:174 msgid "get your own at:" msgstr "" -#: index.php:170 +#: scripts/rebootmmdvm.php:90 scripts/halt.php:89 scripts/log.php:134 +#: scripts/reboot.php:89 index.php:174 credits.php:13 credits.php:17 msgid "Credits" msgstr "" + +#: scripts/halt.php:66 +msgid "Halt in progress...bye" +msgstr "" + +#: scripts/log.php:61 index.php:100 +msgid "View Log" +msgstr "" + +#: scripts/log.php:62 index.php:101 +msgid "Reboot MMDVMHost" +msgstr "" + +#: scripts/log.php:63 index.php:102 +msgid "Reboot System" +msgstr "" + +#: scripts/log.php:64 index.php:103 +msgid "ShutDown System" +msgstr "" + +#: scripts/log.php:68 index.php:108 +msgid "DMRplus" +msgstr "" + +#: scripts/log.php:69 index.php:109 +msgid "BrandMeister" +msgstr "" + +#: scripts/log.php:76 +msgid "Viewing log" +msgstr "" + +#: scripts/log.php:82 +msgid "Level" +msgstr "" + +#: scripts/log.php:83 +msgid "Timestamp" +msgstr "" + +#: scripts/log.php:84 +msgid "Info" +msgstr "" + +#: scripts/reboot.php:66 +msgid "Reboot system in progress" +msgstr "" + +#: ajax.php:214 +msgid "Power" +msgstr "" + +#: ajax.php:219 +msgid "CPU-Temperature" +msgstr "" + +#: ajax.php:224 +msgid "CPU-Frequency" +msgstr "" + +#: ajax.php:228 +msgid "System-Load" +msgstr "" + +#: ajax.php:229 +msgid "CPU-Usage" +msgstr "" + +#: ajax.php:230 +msgid "Uptime" +msgstr "" + +#: ajax.php:231 +msgid "Idle" +msgstr "" + +#: ajax.php:237 +msgid "online" +msgstr "" + +#: ajax.php:237 +msgid "on battery" +msgstr "" + +#: index.php:70 +msgid "DMR-Network: " +msgstr "" + +#: index.php:159 +msgid "Last Reload" +msgstr "" + +#: index.php:169 +msgid "stop refreshing" +msgstr "" + +#: index.php:171 +msgid "start refreshing" +msgstr "" + +#: credits.php:20 +msgid "" +"I think, after all the time this dashboard is developed mainly by myself, it " +"is time to say \"Thank you\" to all those, wo delivered some ideas or code " +"into this project." +msgstr "" + +#: credits.php:21 +msgid "This are explicit named following persons:" +msgstr "" + +#: credits.php:31 +msgid "and some others..." +msgstr "" + +#: credits.php:33 +msgid "" +"Those, who felt forgotten, feel free to commit a change into github of this " +"file." +msgstr "" + +#: credits.php:34 +msgid "Many thanks to you all!" +msgstr "" + +#: credits.php:35 +msgid "Best 73, Kim, DG9VH" +msgstr "" + +#: setup.php:26 +msgid "" +"You forgot to give write-permissions to your webserver-user, see point 3 in " +"linux-step-by-step.md!" +msgstr "" + +#: setup.php:41 setup.php:50 +msgid "Setup-Process" +msgstr "" + +#: setup.php:42 +msgid "" +"Your config-file is written in config/config.php, please remove setup.php " +"for security reasons!" +msgstr "" + +#: setup.php:43 +msgid "Your dashboard is now available." +msgstr "" + +#: setup.php:51 +msgid "Please give necessary information below" +msgstr "" + +#: setup.php:56 +msgid "MMDVMHost-Configuration" +msgstr "" + +#: setup.php:58 +msgid "Path to MMDVMHost-logfile" +msgstr "" + +#: setup.php:62 +msgid "Path to MMDVM.ini" +msgstr "" + +#: setup.php:66 +msgid "MMDVM.ini-filename" +msgstr "" + +#: setup.php:70 +msgid "Path to MMDVMHost-executable" +msgstr "" + +#: setup.php:74 +msgid "Enable extended lookup (show names)" +msgstr "" + +#: setup.php:78 +msgid "Show Talker Alias" +msgstr "" + +#: setup.php:82 +msgid "Path to DMR-ID-Database-File (including filename)" +msgstr "" + +#: setup.php:87 +msgid "YSFGateway-Configuration" +msgstr "" + +#: setup.php:89 +msgid "Enable YSFGateway" +msgstr "" + +#: setup.php:93 +msgid "Path to YSFGateway-logfile" +msgstr "" + +#: setup.php:97 +msgid "Logfile-prefix" +msgstr "" + +#: setup.php:101 +msgid "Path to YSFGateway.ini" +msgstr "" + +#: setup.php:105 +msgid "YSFGateway.ini-filename" +msgstr "" + +#: setup.php:109 +msgid "Path to YSFHosts.txt" +msgstr "" + +#: setup.php:113 +msgid "YSFHosts.txt-filename" +msgstr "" + +#: setup.php:118 +msgid "ircddbgateway-Configuration" +msgstr "" + +#: setup.php:120 +msgid "Path to Links.log" +msgstr "" + +#: setup.php:124 +msgid "Name of ircddbgateway-executeable" +msgstr "" + +#: setup.php:129 +msgid "Global Configuration" +msgstr "" + +#: setup.php:188 +msgid "Locale" +msgstr "" + +#: setup.php:192 +msgid "URL to Logo" +msgstr "" + +#: setup.php:196 +msgid "URL to DMRplus-Logo" +msgstr "" + +#: setup.php:200 +msgid "URL to BrandMeister-Logo" +msgstr "" + +#: setup.php:204 +msgid "Refresh page after in seconds" +msgstr "" + +#: setup.php:208 +msgid "Show System Info" +msgstr "" + +#: setup.php:212 +msgid "Show Disk Use" +msgstr "" + +#: setup.php:216 +msgid "Show Repeater Info" +msgstr "" + +#: setup.php:220 +msgid "Show Enabled Modes" +msgstr "" + +#: setup.php:224 +msgid "Show Last Heard List of today's" +msgstr "" + +#: setup.php:228 +msgid "Show Today's local transmissions" +msgstr "" + +#: setup.php:232 +msgid "Show progressbars" +msgstr "" + +#: setup.php:236 +msgid "Enable CPU-temperature-warning" +msgstr "" + +#: setup.php:240 +msgid "Warning temperature" +msgstr "" + +#: setup.php:244 +msgid "Enable Network-Switching-Function" +msgstr "" + +#: setup.php:248 +msgid "Username for switching networks:" +msgstr "" + +#: setup.php:252 +msgid "Password for switching networks:" +msgstr "" + +#: setup.php:257 +msgid "Enable Management-Functions below" +msgstr "" + +#: setup.php:261 +msgid "Username for view log:" +msgstr "" + +#: setup.php:265 +msgid "Password for view log:" +msgstr "" + +#: setup.php:269 +msgid "Username for halt:" +msgstr "" + +#: setup.php:273 +msgid "Password for halt:" +msgstr "" + +#: setup.php:277 +msgid "Username for reboot:" +msgstr "" + +#: setup.php:281 +msgid "Password for reboot:" +msgstr "" + +#: setup.php:285 +msgid "Username for restart:" +msgstr "" + +#: setup.php:289 +msgid "Password for restart:" +msgstr "" + +#: setup.php:293 +msgid "Reboot MMDVMHost command:" +msgstr "" + +#: setup.php:297 +msgid "Reboot system command:" +msgstr "" + +#: setup.php:301 +msgid "Halt system command:" +msgstr "" + +#: setup.php:305 +msgid "Show Powerstate (online or battery, wiringpi needed)" +msgstr "" + +#: setup.php:309 +msgid "GPIO pin to monitor:" +msgstr "" + +#: setup.php:313 +msgid "State that signalizes online-state:" +msgstr "" + +#: setup.php:317 +msgid "Show link to QRZ.com on Callsigns" +msgstr "" + +#: setup.php:321 +msgid "RSSI value" +msgstr "" + +#: setup.php:323 +msgid "minimal" +msgstr "" + +#: setup.php:324 +msgid "maximal" +msgstr "" + +#: setup.php:325 +msgid "average" +msgstr "" + +#: setup.php:331 +msgid "Save configuration" +msgstr "" + +#: include/functions.php:13 include/functions.php:15 +msgid "compiled" +msgstr "" + +#: include/functions.php:161 +msgid "ircddbgateway is down!" +msgstr "" + +#: include/functions.php:164 include/functions.php:175 +msgid "Remote gateway configured - not checked!" +msgstr "" + +#: include/functions.php:172 +msgid "YSFGateway is down!" +msgstr "" + +#: include/functions.php:182 +msgid "MMDVMHost is down!" +msgstr "" + +#: include/functions.php:550 +msgid "idle" +msgstr "" + +#: include/functions.php:623 +msgid "ircddbgateway not running!" +msgstr "" + +#: include/functions.php:640 include/functions.php:656 +#: include/functions.php:741 +msgid "not linked" +msgstr "" + +#: include/functions.php:692 +msgid "something went wrong!" +msgstr "" + +#: include/functions.php:706 include/functions.php:724 +msgid "Reflector not linked" +msgstr "" + +#: include/functions.php:708 include/functions.php:719 +msgid "Reflector" +msgstr "" + +#: include/functions.php:719 +msgid "not cfmd" +msgstr "" + +#: include/functions.php:743 +msgid "YSFGateway not running" +msgstr "" + +#: include/functions.php:830 +msgid "DMRIDs.dat not correct!" +msgstr "" + +#: index.php:78 +msgid "Configuration" +msgstr "" + +#: setup.php:209 +msgid "Use networks.php instead of configuration below" +msgstr "" diff --git a/locale/es_ES/LC_MESSAGES/messages.po b/locale/es_ES/LC_MESSAGES/messages.po index 2fca34c..70f1c90 100644 --- a/locale/es_ES/LC_MESSAGES/messages.po +++ b/locale/es_ES/LC_MESSAGES/messages.po @@ -732,3 +732,11 @@ msgstr "YSFGateway no está funcionando" #: include/functions.php:830 msgid "DMRIDs.dat not correct!" msgstr "DMRIDs.dat incorrecto!" + +#: index.php:78 +msgid "Configuration" +msgstr "" + +#: setup.php:209 +msgid "Use networks.php instead of configuration below" +msgstr "" diff --git a/locale/pl_PL/LC_MESSAGES/messages.po b/locale/pl_PL/LC_MESSAGES/messages.po index 90aa7b4..e7e5000 100644 --- a/locale/pl_PL/LC_MESSAGES/messages.po +++ b/locale/pl_PL/LC_MESSAGES/messages.po @@ -724,3 +724,11 @@ msgstr "YSFGateway nie działa" #: include/functions.php:830 msgid "DMRIDs.dat not correct!" msgstr "DMRIDs.dat nie jest poprawny!" + +#: index.php:78 +msgid "Configuration" +msgstr "" + +#: setup.php:209 +msgid "Use networks.php instead of configuration below" +msgstr "" diff --git a/locale/pt_PT/LC_MESSAGES/messages.po b/locale/pt_PT/LC_MESSAGES/messages.po index d1e7e91..fb960b6 100644 --- a/locale/pt_PT/LC_MESSAGES/messages.po +++ b/locale/pt_PT/LC_MESSAGES/messages.po @@ -660,3 +660,11 @@ msgstr "Médio" #: setup.php:331 msgid "Save configuration" msgstr "Gravar configuração" + +#: index.php:78 +msgid "Configuration" +msgstr "" + +#: setup.php:209 +msgid "Use networks.php instead of configuration below" +msgstr "" diff --git a/locale/ru_RU/LC_MESSAGES/messages.po b/locale/ru_RU/LC_MESSAGES/messages.po index f38d614..90e8ece 100644 --- a/locale/ru_RU/LC_MESSAGES/messages.po +++ b/locale/ru_RU/LC_MESSAGES/messages.po @@ -696,3 +696,11 @@ msgstr "YSFGateway не запущен" #: include/functions.php:830 msgid "DMRIDs.dat not correct!" msgstr "Некорректный файл DMRIDs.dat!" + +#: index.php:78 +msgid "Configuration" +msgstr "" + +#: setup.php:209 +msgid "Use networks.php instead of configuration below" +msgstr "" diff --git a/locale/sv_SE/LC_MESSAGES/messages.po b/locale/sv_SE/LC_MESSAGES/messages.po index b319f7c..2ecf5ac 100644 --- a/locale/sv_SE/LC_MESSAGES/messages.po +++ b/locale/sv_SE/LC_MESSAGES/messages.po @@ -720,4 +720,12 @@ msgstr "YSFGateway kör inte" #: include/functions.php:830 msgid "DMRIDs.dat not correct!" -msgstr "DMRIDs.dat ej korrekt!" \ No newline at end of file +msgstr "DMRIDs.dat ej korrekt!" + +#: index.php:78 +msgid "Configuration" +msgstr "" + +#: setup.php:209 +msgid "Use networks.php instead of configuration below" +msgstr "" \ No newline at end of file diff --git a/messages.pot b/messages.pot index f4f2ab1..5401d87 100644 --- a/messages.pot +++ b/messages.pot @@ -717,3 +717,11 @@ msgstr "" #: include/functions.php:830 msgid "DMRIDs.dat not correct!" msgstr "" + +#: index.php:78 +msgid "Configuration" +msgstr "" + +#: setup.php:209 +msgid "Use networks.php instead of configuration below" +msgstr "" diff --git a/scripts/switchnetwork.php b/scripts/switchnetwork.php index 04f6011..a0de2a9 100644 --- a/scripts/switchnetwork.php +++ b/scripts/switchnetwork.php @@ -7,6 +7,7 @@ $start = $time; // do not touch this includes!!! Never ever!!! include "../config/config.php"; +include("../config/networks.php"); include "../include/tools.php"; include "../include/functions.php"; include "../include/init.php"; @@ -53,16 +54,27 @@ if (!isset($_SERVER['PHP_AUTH_USER']) && SWITCHNETWORKUSER !== "" && SWITCHNETWO "; + echo "INI:".$network['ini']; + setDMRNetwork($network['label']); + exec( "sudo cp ".MMDVMINIPATH."/".$network['ini'].".ini ".MMDVMINIPATH."/".MMDVMINIFILENAME ); + exec( REBOOTMMDVM ); +} else { + if ($_GET['network'] == "DMRPLUS") { + setDMRNetwork("DMRplus"); + exec( "sudo cp ".MMDVMINIPATH."/DMRPLUS.ini ".MMDVMINIPATH."/".MMDVMINIFILENAME ); + exec( REBOOTMMDVM ); + } + if ($_GET['network'] == "BRANDMEISTER") { + setDMRNetwork("BrandMeister"); + exec( "sudo cp ".MMDVMINIPATH."/BRANDMEISTER.ini ".MMDVMINIPATH."/".MMDVMINIFILENAME ); + exec( REBOOTMMDVM ); + } } + ?> diff --git a/setup.php b/setup.php index b041ea3..5cb6689 100644 --- a/setup.php +++ b/setup.php @@ -205,6 +205,10 @@ get_tz_options(constant("TIMEZONE"), "Timezone", ''); " name="LOGO" class="form-control" placeholder="http://your-logo" aria-describedby="LOGO"> +
+ +
>
+
" name="DMRPLUSLOGO" class="form-control" placeholder="http://your-logo" aria-describedby="DMRPLUSLOGO"> diff --git a/switching-networks.md b/switching-networks.md index 3767a47..5b96088 100644 --- a/switching-networks.md +++ b/switching-networks.md @@ -1,6 +1,7 @@ # Switching Networks To make switching networks possible you have to fulfill following conditions: -1. add www-user to the /etc/sudoers file to be able to execute following commands: cp, killall, MMDVMHost + +* add www-user to the /etc/sudoers file to be able to execute following commands: cp, killall, MMDVMHost You can do this for example with following line: @@ -10,8 +11,9 @@ To make switching networks possible you have to fulfill following conditions: HINT: PLEASE(!) only use visudo for editing the sudoers-file! This validates the file before writing it on the hard-disk. Otherwise there is heavy danger to damange your sudo-system, if you got any error/typo within the line! +* create two or more ini-files containing your configurations. If not using the new variant via /config/networks.php, create one with the name DMRPLUS.ini and the other with the name BRANDMEISTER.ini within the same directory where your MMDVM.ini resists, that contains the configurations for the corresponding networks. -2. create two ini-files, one with the name DMRPLUS.ini and the other with the name BRANDMEISTER.ini within the same directory where your MMDVM.ini resists, that contains the configurations for the corresponding networks. + If you want to use the new variant via /config/networks.php edit the file networks.php to fit your needs and refer to the created ini-files only by using the prefix and not the full name with .ini at the end! ## Security Hint It is absolutely not recommended to put ALL into the sudoers line! The commands above are heavy enougth! diff --git a/version.php b/version.php index d9e9b70..28265c9 100644 --- a/version.php +++ b/version.php @@ -1,3 +1,3 @@