Browse Source

[webconsole] add external CSS support (#1682)

Signed-off-by: R4SAS <r4sas@i2pmail.org>
pull/1687/head
R4SAS 3 years ago committed by GitHub
parent
commit
28a055bd78
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 314
      contrib/i18n/English.po
  2. 29
      contrib/i18n/README.md
  3. 10
      contrib/i18n/regex.txt
  4. 245
      contrib/webconsole/style.css
  5. 170
      daemon/HTTPServer.cpp
  6. 11
      i18n/I18N_langs.h
  7. 19
      i18n/Russian.cpp
  8. 134
      i18n/Turkmen.cpp
  9. 16
      i18n/Ukrainian.cpp

314
contrib/i18n/English.po

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: i2pd\n" "Project-Id-Version: i2pd\n"
"Report-Msgid-Bugs-To: https://github.com/PurpleI2P/i2pd/issues\n" "Report-Msgid-Bugs-To: https://github.com/PurpleI2P/i2pd/issues\n"
"POT-Creation-Date: 2021-06-15 17:40\n" "POT-Creation-Date: 2021-08-06 17:12\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
@ -18,556 +18,564 @@ msgstr ""
"X-Poedit-SearchPath-0: daemon/HTTPServer.cpp\n" "X-Poedit-SearchPath-0: daemon/HTTPServer.cpp\n"
"X-Poedit-SearchPath-1: libi2pd_client/HTTPProxy.cpp\n" "X-Poedit-SearchPath-1: libi2pd_client/HTTPProxy.cpp\n"
#: daemon/HTTPServer.cpp:85 #: daemon/HTTPServer.cpp:175
msgid "Disabled"
msgstr ""
#: daemon/HTTPServer.cpp:86
msgid "Enabled"
msgstr ""
#: daemon/HTTPServer.cpp:147
msgid "day" msgid "day"
msgid_plural "days" msgid_plural "days"
msgstr[0] "" msgstr[0] ""
msgstr[1] "" msgstr[1] ""
#: daemon/HTTPServer.cpp:151 #: daemon/HTTPServer.cpp:179
msgid "hour" msgid "hour"
msgid_plural "hours" msgid_plural "hours"
msgstr[0] "" msgstr[0] ""
msgstr[1] "" msgstr[1] ""
#: daemon/HTTPServer.cpp:155 #: daemon/HTTPServer.cpp:183
msgid "minute" msgid "minute"
msgid_plural "minutes" msgid_plural "minutes"
msgstr[0] "" msgstr[0] ""
msgstr[1] "" msgstr[1] ""
#: daemon/HTTPServer.cpp:158 #: daemon/HTTPServer.cpp:186
msgid "second" msgid "second"
msgid_plural "seconds" msgid_plural "seconds"
msgstr[0] "" msgstr[0] ""
msgstr[1] "" msgstr[1] ""
#. tr: Kibibit #. tr: Kibibit
#: daemon/HTTPServer.cpp:166 daemon/HTTPServer.cpp:194 #: daemon/HTTPServer.cpp:194 daemon/HTTPServer.cpp:222
msgid "KiB" msgid "KiB"
msgstr "" msgstr ""
#. tr: Mebibit #. tr: Mebibit
#: daemon/HTTPServer.cpp:168 #: daemon/HTTPServer.cpp:196
msgid "MiB" msgid "MiB"
msgstr "" msgstr ""
#. tr: Gibibit #. tr: Gibibit
#: daemon/HTTPServer.cpp:170 #: daemon/HTTPServer.cpp:198
msgid "GiB" msgid "GiB"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:187 #: daemon/HTTPServer.cpp:215
msgid "building" msgid "building"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:188 #: daemon/HTTPServer.cpp:216
msgid "failed" msgid "failed"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:189 #: daemon/HTTPServer.cpp:217
msgid "expiring" msgid "expiring"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:190 #: daemon/HTTPServer.cpp:218
msgid "established" msgid "established"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:191 #: daemon/HTTPServer.cpp:219
msgid "unknown" msgid "unknown"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:193 #: daemon/HTTPServer.cpp:221
msgid "exploratory" msgid "exploratory"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:229 #: daemon/HTTPServer.cpp:257
msgid "<b>i2pd</b> webconsole" msgid "<b>i2pd</b> webconsole"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:232 #: daemon/HTTPServer.cpp:260
msgid "Main page" msgid "Main page"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:233 daemon/HTTPServer.cpp:690 #: daemon/HTTPServer.cpp:261 daemon/HTTPServer.cpp:723
msgid "Router commands" msgid "Router commands"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:234 daemon/HTTPServer.cpp:413 #: daemon/HTTPServer.cpp:262 daemon/HTTPServer.cpp:446
#: daemon/HTTPServer.cpp:425 #: daemon/HTTPServer.cpp:458
msgid "Local Destinations" msgid "Local Destinations"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:236 daemon/HTTPServer.cpp:388 #: daemon/HTTPServer.cpp:264 daemon/HTTPServer.cpp:416
#: daemon/HTTPServer.cpp:469 daemon/HTTPServer.cpp:475 #: daemon/HTTPServer.cpp:502 daemon/HTTPServer.cpp:508
#: daemon/HTTPServer.cpp:606 daemon/HTTPServer.cpp:649 #: daemon/HTTPServer.cpp:639 daemon/HTTPServer.cpp:682
#: daemon/HTTPServer.cpp:653 #: daemon/HTTPServer.cpp:686
msgid "LeaseSets" msgid "LeaseSets"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:238 daemon/HTTPServer.cpp:659 #: daemon/HTTPServer.cpp:266 daemon/HTTPServer.cpp:692
msgid "Tunnels" msgid "Tunnels"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:239 daemon/HTTPServer.cpp:395 #: daemon/HTTPServer.cpp:267 daemon/HTTPServer.cpp:423
#: daemon/HTTPServer.cpp:753 daemon/HTTPServer.cpp:769 #: daemon/HTTPServer.cpp:785 daemon/HTTPServer.cpp:801
msgid "Transit Tunnels" msgid "Transit Tunnels"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:240 daemon/HTTPServer.cpp:818 #: daemon/HTTPServer.cpp:268 daemon/HTTPServer.cpp:850
msgid "Transports" msgid "Transports"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:241 #: daemon/HTTPServer.cpp:269
msgid "I2P tunnels" msgid "I2P tunnels"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:243 daemon/HTTPServer.cpp:880 #: daemon/HTTPServer.cpp:271 daemon/HTTPServer.cpp:912
#: daemon/HTTPServer.cpp:890 #: daemon/HTTPServer.cpp:922
msgid "SAM sessions" msgid "SAM sessions"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:259 daemon/HTTPServer.cpp:1280 #: daemon/HTTPServer.cpp:287 daemon/HTTPServer.cpp:1304
#: daemon/HTTPServer.cpp:1283 daemon/HTTPServer.cpp:1286 #: daemon/HTTPServer.cpp:1307 daemon/HTTPServer.cpp:1310
#: daemon/HTTPServer.cpp:1300 daemon/HTTPServer.cpp:1345 #: daemon/HTTPServer.cpp:1324 daemon/HTTPServer.cpp:1369
#: daemon/HTTPServer.cpp:1348 daemon/HTTPServer.cpp:1351 #: daemon/HTTPServer.cpp:1372 daemon/HTTPServer.cpp:1375
msgid "ERROR" msgid "ERROR"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:266 #: daemon/HTTPServer.cpp:294
msgid "OK" msgid "OK"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:267 #: daemon/HTTPServer.cpp:295
msgid "Testing" msgid "Testing"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:268 #: daemon/HTTPServer.cpp:296
msgid "Firewalled" msgid "Firewalled"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:269 daemon/HTTPServer.cpp:290 #: daemon/HTTPServer.cpp:297 daemon/HTTPServer.cpp:318
#: daemon/HTTPServer.cpp:376 #: daemon/HTTPServer.cpp:404
msgid "Unknown" msgid "Unknown"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:270 daemon/HTTPServer.cpp:400 #: daemon/HTTPServer.cpp:298 daemon/HTTPServer.cpp:433
#: daemon/HTTPServer.cpp:401 daemon/HTTPServer.cpp:948 #: daemon/HTTPServer.cpp:434 daemon/HTTPServer.cpp:980
#: daemon/HTTPServer.cpp:957 #: daemon/HTTPServer.cpp:989
msgid "Proxy" msgid "Proxy"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:271 #: daemon/HTTPServer.cpp:299
msgid "Mesh" msgid "Mesh"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:274 #: daemon/HTTPServer.cpp:302
msgid "Error" msgid "Error"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:278 #: daemon/HTTPServer.cpp:306
msgid "Clock skew" msgid "Clock skew"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:281 #: daemon/HTTPServer.cpp:309
msgid "Offline" msgid "Offline"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:284 #: daemon/HTTPServer.cpp:312
msgid "Symmetric NAT" msgid "Symmetric NAT"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:296 #: daemon/HTTPServer.cpp:324
msgid "Uptime" msgid "Uptime"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:299 #: daemon/HTTPServer.cpp:327
msgid "Network status" msgid "Network status"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:304 #: daemon/HTTPServer.cpp:332
msgid "Network status v6" msgid "Network status v6"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:310 daemon/HTTPServer.cpp:317 #: daemon/HTTPServer.cpp:338 daemon/HTTPServer.cpp:345
msgid "Stopping in" msgid "Stopping in"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:324 #: daemon/HTTPServer.cpp:352
msgid "Family" msgid "Family"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:325 #: daemon/HTTPServer.cpp:353
msgid "Tunnel creation success rate" msgid "Tunnel creation success rate"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:326 #: daemon/HTTPServer.cpp:354
msgid "Received" msgid "Received"
msgstr "" msgstr ""
#. tr: Kibibit/s #. tr: Kibibit/s
#: daemon/HTTPServer.cpp:328 daemon/HTTPServer.cpp:331 #: daemon/HTTPServer.cpp:356 daemon/HTTPServer.cpp:359
#: daemon/HTTPServer.cpp:334 #: daemon/HTTPServer.cpp:362
msgid "KiB/s" msgid "KiB/s"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:329 #: daemon/HTTPServer.cpp:357
msgid "Sent" msgid "Sent"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:332 #: daemon/HTTPServer.cpp:360
msgid "Transit" msgid "Transit"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:335 #: daemon/HTTPServer.cpp:363
msgid "Data path" msgid "Data path"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:338 #: daemon/HTTPServer.cpp:366
msgid "Hidden content. Press on text to see." msgid "Hidden content. Press on text to see."
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:341 #: daemon/HTTPServer.cpp:369
msgid "Router Ident" msgid "Router Ident"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:343 #: daemon/HTTPServer.cpp:371
msgid "Router Family" msgid "Router Family"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:344 #: daemon/HTTPServer.cpp:372
msgid "Router Caps" msgid "Router Caps"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:345 #: daemon/HTTPServer.cpp:373
msgid "Version" msgid "Version"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:346 #: daemon/HTTPServer.cpp:374
msgid "Our external address" msgid "Our external address"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:354 #: daemon/HTTPServer.cpp:382
msgid "supported" msgid "supported"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:386 #: daemon/HTTPServer.cpp:414
msgid "Routers" msgid "Routers"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:387 #: daemon/HTTPServer.cpp:415
msgid "Floodfills" msgid "Floodfills"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:394 daemon/HTTPServer.cpp:934 #: daemon/HTTPServer.cpp:422 daemon/HTTPServer.cpp:966
msgid "Client Tunnels" msgid "Client Tunnels"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:399 #: daemon/HTTPServer.cpp:432
msgid "Services" msgid "Services"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:448 #: daemon/HTTPServer.cpp:433 daemon/HTTPServer.cpp:434
#: daemon/HTTPServer.cpp:435 daemon/HTTPServer.cpp:436
#: daemon/HTTPServer.cpp:437 daemon/HTTPServer.cpp:438
msgid "Enabled"
msgstr ""
#: daemon/HTTPServer.cpp:433 daemon/HTTPServer.cpp:434
#: daemon/HTTPServer.cpp:435 daemon/HTTPServer.cpp:436
#: daemon/HTTPServer.cpp:437 daemon/HTTPServer.cpp:438
msgid "Disabled"
msgstr ""
#: daemon/HTTPServer.cpp:481
msgid "Encrypted B33 address" msgid "Encrypted B33 address"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:457 #: daemon/HTTPServer.cpp:490
msgid "Address registration line" msgid "Address registration line"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:462 #: daemon/HTTPServer.cpp:495
msgid "Domain" msgid "Domain"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:463 #: daemon/HTTPServer.cpp:496
msgid "Generate" msgid "Generate"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:464 #: daemon/HTTPServer.cpp:497
msgid "" msgid ""
"<b>Note:</b> result string can be used only for registering 2LD domains " "<b>Note:</b> result string can be used only for registering 2LD domains "
"(example.i2p). For registering subdomains please use i2pd-tools." "(example.i2p). For registering subdomains please use i2pd-tools."
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:470 #: daemon/HTTPServer.cpp:503
msgid "Address" msgid "Address"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:470 #: daemon/HTTPServer.cpp:503
msgid "Type" msgid "Type"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:470 #: daemon/HTTPServer.cpp:503
msgid "EncType" msgid "EncType"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:480 daemon/HTTPServer.cpp:664 #: daemon/HTTPServer.cpp:513 daemon/HTTPServer.cpp:697
msgid "Inbound tunnels" msgid "Inbound tunnels"
msgstr "" msgstr ""
#. tr: Milliseconds #. tr: Milliseconds
#: daemon/HTTPServer.cpp:485 daemon/HTTPServer.cpp:495 #: daemon/HTTPServer.cpp:518 daemon/HTTPServer.cpp:528
#: daemon/HTTPServer.cpp:669 daemon/HTTPServer.cpp:679 #: daemon/HTTPServer.cpp:702 daemon/HTTPServer.cpp:712
msgid "ms" msgid "ms"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:490 daemon/HTTPServer.cpp:674 #: daemon/HTTPServer.cpp:523 daemon/HTTPServer.cpp:707
msgid "Outbound tunnels" msgid "Outbound tunnels"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:502 #: daemon/HTTPServer.cpp:535
msgid "Tags" msgid "Tags"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:502 #: daemon/HTTPServer.cpp:535
msgid "Incoming" msgid "Incoming"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:509 daemon/HTTPServer.cpp:512 #: daemon/HTTPServer.cpp:542 daemon/HTTPServer.cpp:545
msgid "Outgoing" msgid "Outgoing"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:510 daemon/HTTPServer.cpp:526 #: daemon/HTTPServer.cpp:543 daemon/HTTPServer.cpp:559
msgid "Destination" msgid "Destination"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:510 #: daemon/HTTPServer.cpp:543
msgid "Amount" msgid "Amount"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:517 #: daemon/HTTPServer.cpp:550
msgid "Incoming Tags" msgid "Incoming Tags"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:525 daemon/HTTPServer.cpp:528 #: daemon/HTTPServer.cpp:558 daemon/HTTPServer.cpp:561
msgid "Tags sessions" msgid "Tags sessions"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:526 #: daemon/HTTPServer.cpp:559
msgid "Status" msgid "Status"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:535 daemon/HTTPServer.cpp:591 #: daemon/HTTPServer.cpp:568 daemon/HTTPServer.cpp:624
msgid "Local Destination" msgid "Local Destination"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:545 daemon/HTTPServer.cpp:913 #: daemon/HTTPServer.cpp:578 daemon/HTTPServer.cpp:945
msgid "Streams" msgid "Streams"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:567 #: daemon/HTTPServer.cpp:600
msgid "Close stream" msgid "Close stream"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:596 #: daemon/HTTPServer.cpp:629
msgid "I2CP session not found" msgid "I2CP session not found"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:599 #: daemon/HTTPServer.cpp:632
msgid "I2CP is not enabled" msgid "I2CP is not enabled"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:625 #: daemon/HTTPServer.cpp:658
msgid "Invalid" msgid "Invalid"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:628 #: daemon/HTTPServer.cpp:661
msgid "Store type" msgid "Store type"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:629 #: daemon/HTTPServer.cpp:662
msgid "Expires" msgid "Expires"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:634 #: daemon/HTTPServer.cpp:667
msgid "Non Expired Leases" msgid "Non Expired Leases"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:637 #: daemon/HTTPServer.cpp:670
msgid "Gateway" msgid "Gateway"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:638 #: daemon/HTTPServer.cpp:671
msgid "TunnelID" msgid "TunnelID"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:639 #: daemon/HTTPServer.cpp:672
msgid "EndDate" msgid "EndDate"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:649 #: daemon/HTTPServer.cpp:682
msgid "not floodfill" msgid "not floodfill"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:660 #: daemon/HTTPServer.cpp:693
msgid "Queue size" msgid "Queue size"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:691 #: daemon/HTTPServer.cpp:724
msgid "Run peer test" msgid "Run peer test"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:698 #: daemon/HTTPServer.cpp:729
msgid "Decline transit tunnels" msgid "Decline transit tunnels"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:700 #: daemon/HTTPServer.cpp:731
msgid "Accept transit tunnels" msgid "Accept transit tunnels"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:704 daemon/HTTPServer.cpp:709 #: daemon/HTTPServer.cpp:735 daemon/HTTPServer.cpp:740
msgid "Cancel graceful shutdown" msgid "Cancel graceful shutdown"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:706 daemon/HTTPServer.cpp:711 #: daemon/HTTPServer.cpp:737 daemon/HTTPServer.cpp:742
msgid "Start graceful shutdown" msgid "Start graceful shutdown"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:714 #: daemon/HTTPServer.cpp:745
msgid "Force shutdown" msgid "Force shutdown"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:717 #: daemon/HTTPServer.cpp:746
msgid "Reload external CSS styles"
msgstr ""
#: daemon/HTTPServer.cpp:749
msgid "" msgid ""
"<b>Note:</b> any action done here are not persistent and not changes your " "<b>Note:</b> any action done here are not persistent and not changes your "
"config files." "config files."
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:719 #: daemon/HTTPServer.cpp:751
msgid "Logging level" msgid "Logging level"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:727 #: daemon/HTTPServer.cpp:759
msgid "Transit tunnels limit" msgid "Transit tunnels limit"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:732 daemon/HTTPServer.cpp:744 #: daemon/HTTPServer.cpp:764 daemon/HTTPServer.cpp:776
msgid "Change" msgid "Change"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:736 #: daemon/HTTPServer.cpp:768
msgid "Change language" msgid "Change language"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:769 #: daemon/HTTPServer.cpp:801
msgid "no transit tunnels currently built" msgid "no transit tunnels currently built"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:874 daemon/HTTPServer.cpp:897 #: daemon/HTTPServer.cpp:906 daemon/HTTPServer.cpp:929
msgid "SAM disabled" msgid "SAM disabled"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:890 #: daemon/HTTPServer.cpp:922
msgid "no sessions currently running" msgid "no sessions currently running"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:903 #: daemon/HTTPServer.cpp:935
msgid "SAM session not found" msgid "SAM session not found"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:908 #: daemon/HTTPServer.cpp:940
msgid "SAM Session" msgid "SAM Session"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:965 #: daemon/HTTPServer.cpp:997
msgid "Server Tunnels" msgid "Server Tunnels"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:981 #: daemon/HTTPServer.cpp:1013
msgid "Client Forwards" msgid "Client Forwards"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:995 #: daemon/HTTPServer.cpp:1027
msgid "Server Forwards" msgid "Server Forwards"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:1201 #: daemon/HTTPServer.cpp:1225
msgid "Unknown page" msgid "Unknown page"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:1220 #: daemon/HTTPServer.cpp:1244
msgid "Invalid token" msgid "Invalid token"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:1278 daemon/HTTPServer.cpp:1335 #: daemon/HTTPServer.cpp:1302 daemon/HTTPServer.cpp:1359
#: daemon/HTTPServer.cpp:1371 #: daemon/HTTPServer.cpp:1399
msgid "SUCCESS" msgid "SUCCESS"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:1278 #: daemon/HTTPServer.cpp:1302
msgid "Stream closed" msgid "Stream closed"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:1280 #: daemon/HTTPServer.cpp:1304
msgid "Stream not found or already was closed" msgid "Stream not found or already was closed"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:1283 #: daemon/HTTPServer.cpp:1307
msgid "Destination not found" msgid "Destination not found"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:1286 #: daemon/HTTPServer.cpp:1310
msgid "StreamID can't be null" msgid "StreamID can't be null"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:1288 daemon/HTTPServer.cpp:1353 #: daemon/HTTPServer.cpp:1312 daemon/HTTPServer.cpp:1377
msgid "Return to destination page" msgid "Return to destination page"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:1289 daemon/HTTPServer.cpp:1302 #: daemon/HTTPServer.cpp:1313 daemon/HTTPServer.cpp:1326
#: daemon/HTTPServer.cpp:1373 #: daemon/HTTPServer.cpp:1401
msgid "You will be redirected in 5 seconds" msgid "You will be redirected in 5 seconds"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:1300 #: daemon/HTTPServer.cpp:1324
msgid "Transit tunnels count must not exceed 65535" msgid "Transit tunnels count must not exceed 65535"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:1301 daemon/HTTPServer.cpp:1372 #: daemon/HTTPServer.cpp:1325 daemon/HTTPServer.cpp:1400
msgid "Back to commands list" msgid "Back to commands list"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:1337 #: daemon/HTTPServer.cpp:1361
msgid "Register at reg.i2p" msgid "Register at reg.i2p"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:1338 #: daemon/HTTPServer.cpp:1362
msgid "Description" msgid "Description"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:1338 #: daemon/HTTPServer.cpp:1362
msgid "A bit information about service on domain" msgid "A bit information about service on domain"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:1339 #: daemon/HTTPServer.cpp:1363
msgid "Submit" msgid "Submit"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:1345 #: daemon/HTTPServer.cpp:1369
msgid "Domain can't end with .b32.i2p" msgid "Domain can't end with .b32.i2p"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:1348 #: daemon/HTTPServer.cpp:1372
msgid "Domain must end with .i2p" msgid "Domain must end with .i2p"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:1351 #: daemon/HTTPServer.cpp:1375
msgid "Such destination is not found" msgid "Such destination is not found"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:1367 #: daemon/HTTPServer.cpp:1395
msgid "Unknown command" msgid "Unknown command"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:1371 #: daemon/HTTPServer.cpp:1399
msgid "Command accepted" msgid "Command accepted"
msgstr "" msgstr ""

29
contrib/i18n/README.md

@ -0,0 +1,29 @@
`xgettext` command for extracting translation
===
```
xgettext --omit-header -ctr: -ktr -ktr:1,2 daemon/HTTPServer.cpp libi2pd_client/HTTPProxy.cpp
```
Regex for transforming gettext translations to our format:
===
```
in: msgid\ \"(.*)\"\nmsgid_plural\ \"(.*)\"\nmsgstr\[0\]\ \"(.*)\"\nmsgstr\[1\]\ \"(.*)\"\n(msgstr\[2\]\ \"(.*)\"\n)?(msgstr\[3\]\ \"(.*)\"\n)?(msgstr\[4\]\ \"(.*)\"\n)?(msgstr\[5\]\ \"(.*)\"\n)?
out: #{"$2", {"$3", "$4", "$6", "$8", "$10"}},\n
```
```
in: msgid\ \"(.*)\"\nmsgstr\ \"(.*)\"\n
out: {"$1", "$2"},\n
```
```
in: ^#[:.](.*)$\n
out: <to empty line>
```
```
in: \n\n
out: \n
```

10
contrib/i18n/regex.txt

@ -1,10 +0,0 @@
Regex for transforming gettext translations to our format
msgid\ \"(.*)\"\nmsgid_plural\ \"(.*)\"\nmsgstr\[0\]\ \"(.*)\"\nmsgstr\[1\]\ \"(.*)\"\n(msgstr\[2\]\ \"(.*)\"\n)?(msgstr\[3\]\ \"(.*)\"\n)?(msgstr\[4\]\ \"(.*)\"\n)?(msgstr\[5\]\ \"(.*)\"\n)?
#{"$2", {"$3", "$4", "$6", "$8", "$10"}},\n
msgid\ \"(.*)\"\nmsgstr\ \"(.*)\"\n
{"$1", "$2"},\n
^#:(.*)$\n
<to empty line>

245
contrib/webconsole/style.css

@ -0,0 +1,245 @@
body {
font: 100%/1.5em sans-serif;
margin: 0;
padding: 1.5em;
background: #FAFAFA;
color: #103456;
}
a, .slide label {
text-decoration: none;
color: #894C84;
}
a:hover, .slide label:hover {
color: #FAFAFA;
background: #894C84;
}
a.button {
-webkit-appearance: button;
-moz-appearance: button;
appearance: button;
text-decoration: none;
color: initial;
padding: 0 5px;
border: 1px solid #894C84;
}
.header {
font-size: 2.5em;
text-align: center;
margin: 1em 0;
color: #894C84;
}
.wrapper {
margin: 0 auto;
padding: 1em;
max-width: 64em;
}
.menu {
display: block;
float: left;
overflow: hidden;
max-width: 12em;
white-space: nowrap;
text-overflow: ellipsis;
}
.listitem {
display: block;
font-family: monospace;
font-size: 1.2em;
white-space: nowrap;
}
.tableitem {
font-family: monospace;
font-size: 1.2em;
white-space: nowrap;
}
.content {
float: left;
font-size: 1em;
margin-left: 4em;
max-width: 48em;
overflow: auto;
}
.tunnel.established {
color: #56B734;
}
.tunnel.expiring {
color: #D3AE3F;
}
.tunnel.failed {
color: #D33F3F;
}
.tunnel.building {
color: #434343;
}
caption {
font-size: 1.5em;
text-align: center;
color: #894C84;
}
table {
display: table;
border-collapse: collapse;
text-align: center;
}
table.extaddr {
text-align: left;
}
table.services {
width: 100%;
}
textarea {
word-break: break-all;
}
.streamdest {
width: 120px;
max-width: 240px;
overflow: hidden;
text-overflow: ellipsis;
}
.slide div.slidecontent, .slide [type="checkbox"] {
display: none;
}
.slide [type="checkbox"]:checked ~ div.slidecontent {
display: block;
margin-top: 0;
padding: 0;
}
.disabled {
color: #D33F3F;
}
.enabled {
color: #56B734;
}
@media screen and (max-width: 1150px) { /* adaptive style */
.wrapper {
max-width: 58em;
}
.menu {
max-width: 10em;
}
.content {
margin-left: 2em;
max-width: 42em;
}
}
@media screen and (max-width: 980px) {
body {
padding: 1.5em 0 0 0;
}
.menu {
width: 100%;
max-width: unset;
display: block;
float: none;
position: unset;
font-size: 16px;
text-align: center;
}
.menu a, .commands a {
display: inline-block;
padding: 4px;
}
.content {
float: none;
margin-left: unset;
margin-top: 16px;
max-width: 100%;
width: 100%;
text-align: center;
}
a, .slide label {
/* margin-right: 10px; */
display: block;
/* font-size: 18px; */
}
.header {
margin: unset;
font-size: 1.5em;
}
small {
display: block
}
a.button {
-webkit-appearance: button;
-moz-appearance: button;
appearance: button;
text-decoration: none;
color: initial;
margin-top: 10px;
padding: 6px;
border: 1px solid #894c84;
width: -webkit-fill-available;
}
input, select {
width: 35%;
text-align: center;
padding: 5px;
border: 2px solid #ccc;
-webkit-border-radius: 5px;
border-radius: 5px;
font-size: 18px;
}
table.extaddr {
margin: auto;
text-align: unset;
}
textarea {
width: -webkit-fill-available;
height: auto;
padding:5px;
border:2px solid #ccc;
-webkit-border-radius: 5px;
border-radius: 5px;
font-size: 12px;
}
button[type=submit] {
padding: 5px 15px;
background: #ccc;
border: 0 none;
cursor: pointer;
-webkit-border-radius: 5px;
border-radius: 5px;
position: relative;
height: 36px;
display: -webkit-inline-box;
margin-top: 10px;
}
}

170
daemon/HTTPServer.cpp

@ -59,55 +59,75 @@ namespace http {
"JHYnlIsfzJjIp9xZKswL5YKBHL+coKJoRDaUSzoozxHVrygQU4JykQADAwAT5b1NHtwZugAAAABJ" "JHYnlIsfzJjIp9xZKswL5YKBHL+coKJoRDaUSzoozxHVrygQU4JykQADAwAT5b1NHtwZugAAAABJ"
"RU5ErkJggg=="; "RU5ErkJggg==";
// Bundled style
const std::string internalCSS =
"<style>\r\n"
" body { font: 100%/1.5em sans-serif; margin: 0; padding: 1.5em; background: #FAFAFA; color: #103456; }\r\n"
" a, .slide label { text-decoration: none; color: #894C84; }\r\n"
" a:hover, .slide label:hover { color: #FAFAFA; background: #894C84; }\r\n"
" a.button { -webkit-appearance: button; -moz-appearance: button; appearance: button; text-decoration: none;\r\n"
" color: initial; padding: 0 5px; border: 1px solid #894C84; }\r\n"
" .header { font-size: 2.5em; text-align: center; margin: 1em 0; color: #894C84; }\r\n"
" .wrapper { margin: 0 auto; padding: 1em; max-width: 64em; }\r\n"
" .menu { display: block; float: left; overflow: hidden; max-width: 12em; white-space: nowrap; text-overflow: ellipsis; }\r\n"
" .listitem { display: block; font-family: monospace; font-size: 1.2em; white-space: nowrap; }\r\n"
" .tableitem { font-family: monospace; font-size: 1.2em; white-space: nowrap; }\r\n"
" .content { float: left; font-size: 1em; margin-left: 4em; max-width: 48em; overflow: auto; }\r\n"
" .tunnel.established { color: #56B734; } .tunnel.expiring { color: #D3AE3F; }\r\n"
" .tunnel.failed { color: #D33F3F; } .tunnel.building { color: #434343; }\r\n"
" caption { font-size: 1.5em; text-align: center; color: #894C84; }\r\n"
" table { display: table; border-collapse: collapse; text-align: center; }\r\n"
" table.extaddr { text-align: left; } table.services { width: 100%; }\r\n"
" textarea { word-break: break-all; }\r\n"
" .streamdest { width: 120px; max-width: 240px; overflow: hidden; text-overflow: ellipsis;}\r\n"
" .slide div.slidecontent, .slide [type=\"checkbox\"] { display: none; }\r\n"
" .slide [type=\"checkbox\"]:checked ~ div.slidecontent { display: block; margin-top: 0; padding: 0; }\r\n"
" .disabled { color: #D33F3F; } .enabled { color: #56B734; }\r\n"
" @media screen and (max-width: 1150px) {\r\n" /* adaptive style */
" .wrapper { max-width: 58em; } .menu { max-width: 10em; }\r\n"
" .content { margin-left: 2em; max-width: 42em; }\r\n"
" }\r\n"
" @media screen and (max-width: 980px) {\r\n"
" body { padding: 1.5em 0 0 0; }\r\n"
" .menu { width: 100%; max-width: unset; display: block; float: none; position: unset; font-size: 16px;\r\n"
" text-align: center; }\r\n"
" .menu a, .commands a { display: inline-block; padding: 4px; }\r\n"
" .content { float: none; margin-left: unset; margin-top: 16px; max-width: 100%; width: 100%;\r\n"
" text-align: center; }\r\n"
" a, .slide label { /* margin-right: 10px; */ display: block; /* font-size: 18px; */ }\r\n"
" .header { margin: unset; font-size: 1.5em; } small {display: block}\r\n"
" a.button { -webkit-appearance: button; -moz-appearance: button; appearance: button; text-decoration: none;\r\n"
" color: initial; margin-top: 10px; padding: 6px; border: 1px solid #894c84; width: -webkit-fill-available; }\r\n"
" input, select { width: 35%; text-align: center; padding: 5px;\r\n"
" border: 2px solid #ccc; -webkit-border-radius: 5px; border-radius: 5px; font-size: 18px; }\r\n"
" table.extaddr { margin: auto; text-align: unset; }\r\n"
" textarea { width: -webkit-fill-available; height: auto; padding:5px; border:2px solid #ccc;\r\n"
" -webkit-border-radius: 5px; border-radius: 5px; font-size: 12px; }\r\n"
" button[type=submit] { padding: 5px 15px; background: #ccc; border: 0 none; cursor: pointer;\r\n"
" -webkit-border-radius: 5px; border-radius: 5px; position: relative; height: 36px; display: -webkit-inline-box; margin-top: 10px; }\r\n"
" }\r\n"
"</style>\r\n";
// for external style sheet
std::string externalCSS;
static void LoadExtCSS ()
{
std::stringstream s;
std::string styleFile = i2p::fs::DataDirPath ("webconsole/style.css");
if (i2p::fs::Exists(styleFile)) {
std::ifstream f(styleFile, std::ifstream::binary);
s << f.rdbuf();
externalCSS = s.str();
}
}
static void GetStyles (std::stringstream& s) static void GetStyles (std::stringstream& s)
{ {
s << "<style>\r\n" if (externalCSS.length() != 0)
<< " body { font: 100%/1.5em sans-serif; margin: 0; padding: 1.5em; background: #FAFAFA; color: #103456; }\r\n" s << "<style>\r\n" << externalCSS << "</style>\r\n";
<< " a, .slide label { text-decoration: none; color: #894C84; }\r\n" else
<< " a:hover, .slide label:hover { color: #FAFAFA; background: #894C84; }\r\n" s << internalCSS;
<< " a.button { -webkit-appearance: button; -moz-appearance: button; appearance: button; text-decoration: none;\r\n"
<< " color: initial; padding: 0 5px; border: 1px solid #894C84; }\r\n"
<< " .header { font-size: 2.5em; text-align: center; margin: 1em 0; color: #894C84; }\r\n"
<< " .wrapper { margin: 0 auto; padding: 1em; max-width: 64em; }\r\n"
<< " .menu { display: block; float: left; overflow: hidden; max-width: 12em; white-space: nowrap; text-overflow: ellipsis; }\r\n"
<< " .listitem { display: block; font-family: monospace; font-size: 1.2em; white-space: nowrap; }\r\n"
<< " .tableitem { font-family: monospace; font-size: 1.2em; white-space: nowrap; }\r\n"
<< " .content { float: left; font-size: 1em; margin-left: 4em; max-width: 48em; overflow: auto; }\r\n"
<< " .tunnel.established { color: #56B734; } .tunnel.expiring { color: #D3AE3F; }\r\n"
<< " .tunnel.failed { color: #D33F3F; } .tunnel.building { color: #434343; }\r\n"
<< " caption { font-size: 1.5em; text-align: center; color: #894C84; }\r\n"
<< " table { display: table; border-collapse: collapse; text-align: center; }\r\n"
<< " table.extaddr { text-align: left; } table.services { width: 100%; }\r\n"
<< " textarea { word-break: break-all; }\r\n"
<< " .streamdest { width: 120px; max-width: 240px; overflow: hidden; text-overflow: ellipsis;}\r\n"
<< " .slide div.slidecontent, .slide [type=\"checkbox\"] { display: none; }\r\n"
<< " .slide [type=\"checkbox\"]:checked ~ div.slidecontent { display: block; margin-top: 0; padding: 0; }\r\n"
<< " .disabled:after { color: #D33F3F; content: \"" << tr("Disabled") << "\" }\r\n"
<< " .enabled:after { color: #56B734; content: \"" << tr("Enabled") << "\" }\r\n"
<< " @media screen and (max-width: 1150px) {\r\n" /* adaptive style */
<< " .wrapper { max-width: 58em; } .menu { max-width: 10em; }\r\n"
<< " .content { margin-left: 2em; max-width: 42em; }\r\n"
<< " }\r\n"
<< " @media screen and (max-width: 980px) {\r\n"
<< " body { padding: 1.5em 0 0 0; }\r\n"
<< " .menu { width: 100%; max-width: unset; display: block; float: none; position: unset; font-size: 16px;\r\n"
<< " text-align: center; }\r\n"
<< " .menu a, .commands a { display: inline-block; padding: 4px; }\r\n"
<< " .content { float: none; margin-left: unset; margin-top: 16px; max-width: 100%; width: 100%;\r\n"
<< " text-align: center; }\r\n"
<< " a, .slide label { /* margin-right: 10px; */ display: block; /* font-size: 18px; */ }\r\n"
<< " .header { margin: unset; font-size: 1.5em; } small {display: block}\r\n"
<< " a.button { -webkit-appearance: button; -moz-appearance: button; appearance: button; text-decoration: none;\r\n"
<< " color: initial; margin-top: 10px; padding: 6px; border: 1px solid #894c84; width: -webkit-fill-available; }\r\n"
<< " input, select { width: 35%; text-align: center; padding: 5px;\r\n"
<< " border: 2px solid #ccc; -webkit-border-radius: 5px; border-radius: 5px; font-size: 18px; }\r\n"
<< " table.extaddr { margin: auto; text-align: unset; }\r\n"
<< " textarea { width: -webkit-fill-available; height: auto; padding:5px; border:2px solid #ccc;\r\n"
<< " -webkit-border-radius: 5px; border-radius: 5px; font-size: 12px; }\r\n"
<< " button[type=submit] { padding: 5px 15px; background: #ccc; border: 0 none; cursor: pointer;\r\n"
<< " -webkit-border-radius: 5px; border-radius: 5px; position: relative; height: 36px; display: -webkit-inline-box; margin-top: 10px; }\r\n"
<< " }\r\n" /* adaptive style */
<< "</style>\r\n";
} }
const char HTTP_PAGE_TUNNELS[] = "tunnels"; const char HTTP_PAGE_TUNNELS[] = "tunnels";
@ -133,11 +153,19 @@ namespace http {
const char HTTP_COMMAND_LIMITTRANSIT[] = "limittransit"; const char HTTP_COMMAND_LIMITTRANSIT[] = "limittransit";
const char HTTP_COMMAND_GET_REG_STRING[] = "get_reg_string"; const char HTTP_COMMAND_GET_REG_STRING[] = "get_reg_string";
const char HTTP_COMMAND_SETLANGUAGE[] = "setlanguage"; const char HTTP_COMMAND_SETLANGUAGE[] = "setlanguage";
const char HTTP_COMMAND_RELOAD_CSS[] = "reload_css";
const char HTTP_PARAM_SAM_SESSION_ID[] = "id"; const char HTTP_PARAM_SAM_SESSION_ID[] = "id";
const char HTTP_PARAM_ADDRESS[] = "address"; const char HTTP_PARAM_ADDRESS[] = "address";
static std::string ConvertTime (uint64_t time); static std::string ConvertTime (uint64_t time)
std::map<uint32_t, uint32_t> HTTPConnection::m_Tokens; {
lldiv_t divTime = lldiv(time, 1000);
time_t t = divTime.quot;
struct tm *tm = localtime(&t);
char date[128];
snprintf(date, sizeof(date), "%02d/%02d/%d %02d:%02d:%02d.%03lld", tm->tm_mday, tm->tm_mon + 1, tm->tm_year + 1900, tm->tm_hour, tm->tm_min, tm->tm_sec, divTime.rem);
return date;
}
static void ShowUptime (std::stringstream& s, int seconds) static void ShowUptime (std::stringstream& s, int seconds)
{ {
@ -210,9 +238,9 @@ namespace http {
std::string webroot; i2p::config::GetOption("http.webroot", webroot); std::string webroot; i2p::config::GetOption("http.webroot", webroot);
// Page language // Page language
std::string lang, langCode; i2p::config::GetOption("http.lang", lang); std::string currLang = i2p::context.GetLanguage ()->GetLanguage(); // get current used language
if (lang == "russian") langCode = "ru"; auto it = i2p::i18n::languages.find(currLang);
else langCode = "en"; std::string langCode = it->second.ShortCode;
s << s <<
"<!DOCTYPE html>\r\n" "<!DOCTYPE html>\r\n"
@ -395,14 +423,19 @@ namespace http {
s << "<b>" << tr("Transit Tunnels") << ":</b> " << std::to_string(transitTunnelCount) << "<br>\r\n<br>\r\n"; s << "<b>" << tr("Transit Tunnels") << ":</b> " << std::to_string(transitTunnelCount) << "<br>\r\n<br>\r\n";
if(outputFormat==OutputFormatEnum::forWebConsole) { if(outputFormat==OutputFormatEnum::forWebConsole) {
bool httpproxy = i2p::client::context.GetHttpProxy () ? true : false;
bool socksproxy = i2p::client::context.GetSocksProxy () ? true : false;
bool bob = i2p::client::context.GetBOBCommandChannel () ? true : false;
bool sam = i2p::client::context.GetSAMBridge () ? true : false;
bool i2cp = i2p::client::context.GetI2CPServer () ? true : false;
bool i2pcontrol; i2p::config::GetOption("i2pcontrol.enabled", i2pcontrol); bool i2pcontrol; i2p::config::GetOption("i2pcontrol.enabled", i2pcontrol);
s << "<table class=\"services\"><caption>" << tr("Services") << "</caption><tbody>\r\n"; s << "<table class=\"services\"><caption>" << tr("Services") << "</caption><tbody>\r\n";
s << "<tr><td>" << "HTTP " << tr("Proxy") << "</td><td><div class='" << ((i2p::client::context.GetHttpProxy ()) ? "enabled" : "disabled") << "'></div></td></tr>\r\n"; s << "<tr><td>" << "HTTP " << tr("Proxy") << "</td><td class='" << (httpproxy ? "enabled" : "disabled") << "'>" << (httpproxy ? tr("Enabled") : tr("Disabled")) << "</td></tr>\r\n";
s << "<tr><td>" << "SOCKS " << tr("Proxy") << "</td><td><div class='" << ((i2p::client::context.GetSocksProxy ()) ? "enabled" : "disabled") << "'></div></td></tr>\r\n"; s << "<tr><td>" << "SOCKS " << tr("Proxy") << "</td><td class='" << (socksproxy ? "enabled" : "disabled") << "'>" << (socksproxy ? tr("Enabled") : tr("Disabled")) << "</td></tr>\r\n";
s << "<tr><td>" << "BOB" << "</td><td><div class='" << ((i2p::client::context.GetBOBCommandChannel ()) ? "enabled" : "disabled") << "'></div></td></tr>\r\n"; s << "<tr><td>" << "BOB" << "</td><td class='" << (bob ? "enabled" : "disabled") << "'>" << (bob ? tr("Enabled") : tr("Disabled")) << "</td></tr>\r\n";
s << "<tr><td>" << "SAM" << "</td><td><div class='" << ((i2p::client::context.GetSAMBridge ()) ? "enabled" : "disabled") << "'></div></td></tr>\r\n"; s << "<tr><td>" << "SAM" << "</td><td class='" << (sam ? "enabled" : "disabled") << "'>" << (sam ? tr("Enabled") : tr("Disabled")) << "</td></tr>\r\n";
s << "<tr><td>" << "I2CP" << "</td><td><div class='" << ((i2p::client::context.GetI2CPServer ()) ? "enabled" : "disabled") << "'></div></td></tr>\r\n"; s << "<tr><td>" << "I2CP" << "</td><td class='" << (i2cp ? "enabled" : "disabled") << "'>" << (i2cp ? tr("Enabled") : tr("Disabled")) << "</td></tr>\r\n";
s << "<tr><td>" << "I2PControl" << "</td><td><div class='" << ((i2pcontrol) ? "enabled" : "disabled") << "'></div></td></tr>\r\n"; s << "<tr><td>" << "I2PControl" << "</td><td class='" << (i2pcontrol ? "enabled" : "disabled") << "'>" << (i2pcontrol ? tr("Enabled") : tr("Disabled")) << "</td></tr>\r\n";
s << "</tbody></table>\r\n"; s << "</tbody></table>\r\n";
} }
} }
@ -709,7 +742,8 @@ namespace http {
s << " <a href=\"" << webroot << "?cmd=" << HTTP_COMMAND_SHUTDOWN_START << "&token=" << token << "\">" << tr("Start graceful shutdown") << "</a><br>\r\n"; s << " <a href=\"" << webroot << "?cmd=" << HTTP_COMMAND_SHUTDOWN_START << "&token=" << token << "\">" << tr("Start graceful shutdown") << "</a><br>\r\n";
#endif #endif
s << " <a href=\"" << webroot << "?cmd=" << HTTP_COMMAND_SHUTDOWN_NOW << "&token=" << token << "\">" << tr("Force shutdown") << "</a>\r\n"; s << " <a href=\"" << webroot << "?cmd=" << HTTP_COMMAND_SHUTDOWN_NOW << "&token=" << token << "\">" << tr("Force shutdown") << "</a><br><br>\r\n";
s << " <a href=\"" << webroot << "?cmd=" << HTTP_COMMAND_RELOAD_CSS << "&token=" << token << "\">" << tr("Reload external CSS styles") << "</a>\r\n";
s << "</div>"; s << "</div>";
s << "<br>\r\n<small>" << tr("<b>Note:</b> any action done here are not persistent and not changes your config files.") << "</small>\r\n<br>\r\n"; s << "<br>\r\n<small>" << tr("<b>Note:</b> any action done here are not persistent and not changes your config files.") << "</small>\r\n<br>\r\n";
@ -1003,16 +1037,6 @@ namespace http {
} }
} }
std::string ConvertTime (uint64_t time)
{
lldiv_t divTime = lldiv(time, 1000);
time_t t = divTime.quot;
struct tm *tm = localtime(&t);
char date[128];
snprintf(date, sizeof(date), "%02d/%02d/%d %02d:%02d:%02d.%03lld", tm->tm_mday, tm->tm_mon + 1, tm->tm_year + 1900, tm->tm_hour, tm->tm_min, tm->tm_sec, divTime.rem);
return date;
}
HTTPConnection::HTTPConnection (std::string hostname, std::shared_ptr<boost::asio::ip::tcp::socket> socket): HTTPConnection::HTTPConnection (std::string hostname, std::shared_ptr<boost::asio::ip::tcp::socket> socket):
m_Socket (socket), m_BufferLen (0), expected_host(hostname) m_Socket (socket), m_BufferLen (0), expected_host(hostname)
{ {
@ -1139,6 +1163,8 @@ namespace http {
SendReply (res, content); SendReply (res, content);
} }
std::map<uint32_t, uint32_t> HTTPConnection::m_Tokens;
uint32_t HTTPConnection::CreateToken () uint32_t HTTPConnection::CreateToken ()
{ {
uint32_t token; uint32_t token;
@ -1359,6 +1385,10 @@ namespace http {
if (currLang.compare(lang) != 0) if (currLang.compare(lang) != 0)
i2p::i18n::SetLanguage(lang); i2p::i18n::SetLanguage(lang);
} }
else if (cmd == HTTP_COMMAND_RELOAD_CSS)
{
LoadExtCSS();
}
else else
{ {
res.code = 400; res.code = 400;
@ -1421,6 +1451,8 @@ namespace http {
m_Thread.reset (new std::thread (std::bind (&HTTPServer::Run, this))); m_Thread.reset (new std::thread (std::bind (&HTTPServer::Run, this)));
m_Acceptor.listen (); m_Acceptor.listen ();
Accept (); Accept ();
LoadExtCSS();
} }
void HTTPServer::Stop () void HTTPServer::Stop ()

11
i18n/I18N_langs.h

@ -66,6 +66,7 @@ namespace i18n
struct langData struct langData
{ {
std::string LocaleName; // localized name std::string LocaleName; // localized name
std::string ShortCode; // short language code, like "en"
std::function<std::shared_ptr<const i2p::i18n::Locale> (void)> LocaleFunc; std::function<std::shared_ptr<const i2p::i18n::Locale> (void)> LocaleFunc;
}; };
@ -81,11 +82,11 @@ namespace i18n
*/ */
static std::map<std::string, langData> languages static std::map<std::string, langData> languages
{ {
{ "afrikaans", {"Afrikaans", i2p::i18n::afrikaans::GetLocale} }, { "afrikaans", {"Afrikaans", "af", i2p::i18n::afrikaans::GetLocale} },
{ "english", {"English", i2p::i18n::english::GetLocale} }, { "english", {"English", "en", i2p::i18n::english::GetLocale} },
{ "russian", {"русский язык", i2p::i18n::russian::GetLocale} }, { "russian", {"русский язык", "ru", i2p::i18n::russian::GetLocale} },
{ "turkmen", {"türkmen dili", i2p::i18n::turkmen::GetLocale} }, { "turkmen", {"türkmen dili", "tk", i2p::i18n::turkmen::GetLocale} },
{ "ukrainian", {"украї́нська мо́ва", i2p::i18n::ukrainian::GetLocale} }, { "ukrainian", {"украї́нська мо́ва", "uk", i2p::i18n::ukrainian::GetLocale} },
}; };
} // i18n } // i18n

19
i18n/Russian.cpp

@ -31,8 +31,6 @@ namespace russian // language namespace
static std::map<std::string, std::string> strings static std::map<std::string, std::string> strings
{ {
{"Disabled", "Выключено"},
{"Enabled", "Включено"},
{"KiB", "КиБ"}, {"KiB", "КиБ"},
{"MiB", "МиБ"}, {"MiB", "МиБ"},
{"GiB", "ГиБ"}, {"GiB", "ГиБ"},
@ -45,10 +43,10 @@ namespace russian // language namespace
{"<b>i2pd</b> webconsole", "Веб-консоль <b>i2pd</b>"}, {"<b>i2pd</b> webconsole", "Веб-консоль <b>i2pd</b>"},
{"Main page", "Главная"}, {"Main page", "Главная"},
{"Router commands", "Команды роутера"}, {"Router commands", "Команды роутера"},
{"Local destinations", "Локальные назначения"}, {"Local Destinations", "Локальные назначения"},
{"LeaseSets", "Лизсеты"}, {"LeaseSets", "Лизсеты"},
{"Tunnels", "Туннели"}, {"Tunnels", "Туннели"},
{"Transit tunnels", "Транзитные туннели"}, {"Transit Tunnels", "Транзитные туннели"},
{"Transports", "Транспорты"}, {"Transports", "Транспорты"},
{"I2P tunnels", "I2P туннели"}, {"I2P tunnels", "I2P туннели"},
{"SAM sessions", "SAM сессии"}, {"SAM sessions", "SAM сессии"},
@ -84,9 +82,9 @@ namespace russian // language namespace
{"Routers", "Роутеры"}, {"Routers", "Роутеры"},
{"Floodfills", "Флудфилы"}, {"Floodfills", "Флудфилы"},
{"Client Tunnels", "Клиентские туннели"}, {"Client Tunnels", "Клиентские туннели"},
{"Transit Tunnels", "Транзитные туннели"},
{"Services", "Сервисы"}, {"Services", "Сервисы"},
{"Local Destinations", "Локальные назначения"}, {"Enabled", "Включено"},
{"Disabled", "Выключено"},
{"Encrypted B33 address", "Шифрованные B33 адреса"}, {"Encrypted B33 address", "Шифрованные B33 адреса"},
{"Address registration line", "Строка регистрации адреса"}, {"Address registration line", "Строка регистрации адреса"},
{"Domain", "Домен"}, {"Domain", "Домен"},
@ -103,8 +101,8 @@ namespace russian // language namespace
{"Outgoing", "Исходящие"}, {"Outgoing", "Исходящие"},
{"Destination", "Назначение"}, {"Destination", "Назначение"},
{"Amount", "Количество"}, {"Amount", "Количество"},
{"Incoming Tags", "Входящие Теги"}, {"Incoming Tags", "Входящие теги"},
{"Tags sessions", "Сессии Тегов"}, {"Tags sessions", "Сессии тегов"},
{"Status", "Статус"}, {"Status", "Статус"},
{"Local Destination", "Локальное назначение"}, {"Local Destination", "Локальное назначение"},
{"Streams", "Стримы"}, {"Streams", "Стримы"},
@ -126,6 +124,7 @@ namespace russian // language namespace
{"Cancel graceful shutdown", "Отменить плавную остановку"}, {"Cancel graceful shutdown", "Отменить плавную остановку"},
{"Start graceful shutdown", "Запустить плавную остановку"}, {"Start graceful shutdown", "Запустить плавную остановку"},
{"Force shutdown", "Принудительная остановка"}, {"Force shutdown", "Принудительная остановка"},
{"Reload external CSS styles", "Перезагрузить внешние CSS стили"},
{"<b>Note:</b> any action done here are not persistent and not changes your config files.", "<b>Примечание:</b> любое действие произведенное здесь не является постоянным и не изменяет ваши конфигурационные файлы."}, {"<b>Note:</b> any action done here are not persistent and not changes your config files.", "<b>Примечание:</b> любое действие произведенное здесь не является постоянным и не изменяет ваши конфигурационные файлы."},
{"Logging level", "Уровень логирования"}, {"Logging level", "Уровень логирования"},
{"Transit tunnels limit", "Лимит транзитных туннелей"}, {"Transit tunnels limit", "Лимит транзитных туннелей"},
@ -147,7 +146,7 @@ namespace russian // language namespace
{"Destination not found", "Точка назначения не найдена"}, {"Destination not found", "Точка назначения не найдена"},
{"StreamID can't be null", "StreamID не может быть пустым"}, {"StreamID can't be null", "StreamID не может быть пустым"},
{"Return to destination page", "Вернуться на страницу точки назначения"}, {"Return to destination page", "Вернуться на страницу точки назначения"},
{"You will be redirected back in 5 seconds", "Вы будете переадресованы назад через 5 секунд"}, {"You will be redirected in 5 seconds", "Вы будете переадресованы через 5 секунд"},
{"Transit tunnels count must not exceed 65535", "Число транзитных туннелей не должно превышать 65535"}, {"Transit tunnels count must not exceed 65535", "Число транзитных туннелей не должно превышать 65535"},
{"Back to commands list", "Вернуться к списку команд"}, {"Back to commands list", "Вернуться к списку команд"},
{"Register at reg.i2p", "Зарегистрировать на reg.i2p"}, {"Register at reg.i2p", "Зарегистрировать на reg.i2p"},
@ -159,7 +158,6 @@ namespace russian // language namespace
{"Such destination is not found", "Такая точка назначения не найдена"}, {"Such destination is not found", "Такая точка назначения не найдена"},
{"Unknown command", "Неизвестная команда"}, {"Unknown command", "Неизвестная команда"},
{"Command accepted", "Команда принята"}, {"Command accepted", "Команда принята"},
{"You will be redirected in 5 seconds", "Вы будете переадресованы через 5 секунд"},
{"Proxy error", "Ошибка прокси"}, {"Proxy error", "Ошибка прокси"},
{"Proxy info", "Информация прокси"}, {"Proxy info", "Информация прокси"},
{"Proxy error: Host not found", "Ошибка прокси: Узел не найден"}, {"Proxy error: Host not found", "Ошибка прокси: Узел не найден"},
@ -176,7 +174,6 @@ namespace russian // language namespace
{"Addresshelper found", "Найден addresshelper"}, {"Addresshelper found", "Найден addresshelper"},
{"already in router's addressbook", "уже в адресной книге роутера"}, {"already in router's addressbook", "уже в адресной книге роутера"},
{"to update record", "чтобы обновить запись"}, {"to update record", "чтобы обновить запись"},
{"Invalid Request", "неверный запрос"},
{"invalid request uri", "некорректный URI запроса"}, {"invalid request uri", "некорректный URI запроса"},
{"Can't detect destination host from request", "Не удалось определить адрес назначения из запроса"}, {"Can't detect destination host from request", "Не удалось определить адрес назначения из запроса"},
{"Outproxy failure", "Ошибка внешнего прокси"}, {"Outproxy failure", "Ошибка внешнего прокси"},

134
i18n/Turkmen.cpp

@ -31,72 +31,26 @@ namespace turkmen // language namespace
static std::map<std::string, std::string> strings static std::map<std::string, std::string> strings
{ {
// HTTP Proxy
{"Proxy error", "Proksi ýalňyşlygy"},
{"Proxy info", "Proksi maglumat"},
{"Proxy error: Host not found", "Proksi ýalňyşlygy: Host tapylmady"},
{"Remote host not found in router's addressbook", "Uzakdaky öý eýesi marşruteriň salgy kitabynda tapylmady"},
{"You may try to find this host on jump services below", "Aşakdaky böküş hyzmatlarynda bu öý eýesini tapmaga synanyşyp bilersiňiz"},
{"Invalid request", "Nädogry haýyş"},
{"Proxy unable to parse your request", "Proksi haýyşyňyzy derňäp bilmeýär"},
{"addresshelper is not supported", "Salgylandyryjy goldanok"},
{"Host", "Adres"},
{"added to router's addressbook from helper", "marşruteriň adresini kömekçiden goşdy"},
{"already in router's addressbook", "marşruteriň adres kitaby"},
{"Click", "Basyň"},
{"here", "bu ýerde"},
{"to proceed", "dowam etmek"},
{"to update record", "recordazgyny täzelemek üçin"},
{"Addresshelper found", "Forgelper tapyldy"},
{"invalid request uri", "nädogry haýyş URI"},
{"Can't detect destination host from request", "Haýyşdan barmaly ýerini tapyp bilemok"},
{"Outproxy failure", "Daşarky proksi ýalňyşlyk"},
{"bad outproxy settings", "daşarky daşarky proksi sazlamalary nädogry"},
{"not inside I2P network, but outproxy is not enabled", "I2P torunda däl, ýöne daşarky proksi goşulmaýar"},
{"unknown outproxy url", "näbelli daşarky proksi URL"},
{"cannot resolve upstream proxy", "has ýokary proksi kesgitläp bilmeýär"},
{"hostname too long", "hoster eýesi ady gaty uzyn"},
{"cannot connect to upstream socks proxy", "ýokary jorap SOCKS proksi bilen birigip bolmaýar"},
{"Cannot negotiate with socks proxy", "Iň ýokary jorap SOCKS proksi bilen ylalaşyp bilmeýärler"},
{"CONNECT error", "Bagyr haýyşy säwligi"},
{"Failed to Connect", "Birikdirip bilmedi"},
{"socks proxy error", "socks proksi ýalňyşlygy"},
{"failed to send request to upstream", "öý eýesi proksi üçin haýyş iberip bilmedi"},
{"No Reply From socks proxy", "Jorap proksi serwerinden hiç hili jogap ýok"},
{"cannot connect", "birikdirip bilmedi"},
{"http out proxy not implemented", "daşarky HTTP proksi serwerini goldamak amala aşyrylmaýar"},
{"cannot connect to upstream http proxy", "ýokary akym HTTP proksi serwerine birigip bilmedi"},
{"Host is down", "Salgy elýeterli däl"},
{"Can't create connection to requested host, it may be down. Please try again later.",
"Talap edilýän salgyda birikmäni gurup bilmedim, onlaýn bolup bilmez. Soňra haýyşy soň gaýtalamaga synanyşyň."},
// Webconsole //
// cssStyles
{"Disabled", "Öçürildi"},
{"Enabled", "Goşuldy"},
// ShowTraffic
{"KiB", "KiB"}, {"KiB", "KiB"},
{"MiB", "MiB"}, {"MiB", "MiB"},
{"GiB", "GiB"}, {"GiB", "GiB"},
// ShowTunnelDetails
{"building", "bina"}, {"building", "bina"},
{"failed", "şowsuz"}, {"failed", "şowsuz"},
{"expiring", "möhleti gutarýar"}, {"expiring", "möhleti gutarýar"},
{"established", "işleýär"}, {"established", "işleýär"},
{"exploratory", "gözleg"},
{"unknown", "näbelli"}, {"unknown", "näbelli"},
{"exploratory", "gözleg"},
{"<b>i2pd</b> webconsole", "Web konsoly <b>i2pd</b>"}, {"<b>i2pd</b> webconsole", "Web konsoly <b>i2pd</b>"},
// ShowPageHead
{"Main page", "Esasy sahypa"}, {"Main page", "Esasy sahypa"},
{"Router commands", "Marşrutizator buýruklary"}, {"Router commands", "Marşrutizator buýruklary"},
{"Local destinations", "Ýerli ýerler"}, {"Local Destinations", "Ýerli ýerler"},
{"LeaseSets", "Lizset"}, {"LeaseSets", "Lizset"},
{"Tunnels", "Tuneller"}, {"Tunnels", "Tuneller"},
{"Transit tunnels", "Tranzit tunels"}, {"Transit Tunnels", "Tranzit Tunelleri"},
{"Transports", "Daşamak"}, {"Transports", "Daşamak"},
{"I2P tunnels", "I2P tuneller"}, {"I2P tunnels", "I2P tuneller"},
{"SAM sessions", "SAM Sessiýasy"}, {"SAM sessions", "SAM Sessiýasy"},
// Network Status {"ERROR", "Ýalňyşlyk"},
{"OK", "OK"}, {"OK", "OK"},
{"Testing", "Synag etmek"}, {"Testing", "Synag etmek"},
{"Firewalled", "Daşynda petiklendi"}, {"Firewalled", "Daşynda petiklendi"},
@ -107,7 +61,6 @@ namespace turkmen // language namespace
{"Clock skew", "Takyk wagt däl"}, {"Clock skew", "Takyk wagt däl"},
{"Offline", "Awtonom"}, {"Offline", "Awtonom"},
{"Symmetric NAT", "Simmetriklik NAT"}, {"Symmetric NAT", "Simmetriklik NAT"},
// Status
{"Uptime", "Onlaýn onlaýn sözlügi"}, {"Uptime", "Onlaýn onlaýn sözlügi"},
{"Network status", "Tor ýagdaýy"}, {"Network status", "Tor ýagdaýy"},
{"Network status v6", "Tor ýagdaýy v6"}, {"Network status v6", "Tor ýagdaýy v6"},
@ -115,9 +68,9 @@ namespace turkmen // language namespace
{"Family", "Maşgala"}, {"Family", "Maşgala"},
{"Tunnel creation success rate", "Gurlan teneller üstünlikli gurlan teneller"}, {"Tunnel creation success rate", "Gurlan teneller üstünlikli gurlan teneller"},
{"Received", "Alnan"}, {"Received", "Alnan"},
{"KiB/s", "KiB/s"},
{"Sent", "Ýerleşdirildi"}, {"Sent", "Ýerleşdirildi"},
{"Transit", "Tranzit"}, {"Transit", "Tranzit"},
{"KiB/s", "KiB/s"},
{"Data path", "Maglumat ýoly"}, {"Data path", "Maglumat ýoly"},
{"Hidden content. Press on text to see.", "Gizlin mazmun. Görkezmek üçin tekste basyň."}, {"Hidden content. Press on text to see.", "Gizlin mazmun. Görkezmek üçin tekste basyň."},
{"Router Ident", "Marşrutly kesgitleýji"}, {"Router Ident", "Marşrutly kesgitleýji"},
@ -129,23 +82,20 @@ namespace turkmen // language namespace
{"Routers", "Marşrutizatorlar"}, {"Routers", "Marşrutizatorlar"},
{"Floodfills", "Fludfillar"}, {"Floodfills", "Fludfillar"},
{"Client Tunnels", "Müşderi tunelleri"}, {"Client Tunnels", "Müşderi tunelleri"},
{"Transit Tunnels", "Tranzit Tunelleri"},
{"Services", "Hyzmatlar"}, {"Services", "Hyzmatlar"},
// ShowLocalDestinations {"Enabled", "Goşuldy"},
{"Local Destinations", "Ýerli ýerler"}, {"Disabled", "Öçürildi"},
// ShowLeaseSetDestination
{"Encrypted B33 address", "Şifrlenen B33 salgylar"}, {"Encrypted B33 address", "Şifrlenen B33 salgylar"},
{"Address registration line", "Hasaba alyş salgysy"}, {"Address registration line", "Hasaba alyş salgysy"},
{"Domain", "Domen"}, {"Domain", "Domen"},
{"Generate", "Öndürmek"}, {"Generate", "Öndürmek"},
{"<b>Note:</b> result string can be used only for registering 2LD domains (example.i2p). For registering subdomains please use i2pd-tools.", {"<b>Note:</b> result string can be used only for registering 2LD domains (example.i2p). For registering subdomains please use i2pd-tools.", "<b>Bellik:</b> Alnan setir diňe ikinji derejeli domenleri bellige almak üçin ulanylyp bilner (example.i2p). Subýutmalary hasaba almak üçin i2pd ulanyň-tools."},
"<b>Bellik:</b> Alnan setir diňe ikinji derejeli domenleri bellige almak üçin ulanylyp bilner. Subýutmalary hasaba almak üçin i2pd ulanyň-tools."},
{"Address", "Salgysy"}, {"Address", "Salgysy"},
{"Type", "Görnüş"}, {"Type", "Görnüş"},
{"EncType", "Şifrlemek görnüşi"}, {"EncType", "Şifrlemek görnüşi"},
{"Inbound tunnels", "Gelýän tuneller"}, {"Inbound tunnels", "Gelýän tuneller"},
{"ms", "ms"},
{"Outbound tunnels", "Çykýan tuneller"}, {"Outbound tunnels", "Çykýan tuneller"},
{"ms", "ms"}, // milliseconds
{"Tags", "Bellikler"}, {"Tags", "Bellikler"},
{"Incoming", "Gelýän"}, {"Incoming", "Gelýän"},
{"Outgoing", "Çykýan"}, {"Outgoing", "Çykýan"},
@ -154,14 +104,11 @@ namespace turkmen // language namespace
{"Incoming Tags", "Gelýän bellikler"}, {"Incoming Tags", "Gelýän bellikler"},
{"Tags sessions", "Sapaklar bellikler"}, {"Tags sessions", "Sapaklar bellikler"},
{"Status", "Ýagdaýy"}, {"Status", "Ýagdaýy"},
// ShowLocalDestination
{"Local Destination", "Ýerli maksat"}, {"Local Destination", "Ýerli maksat"},
{"Streams", "Strimlary"}, {"Streams", "Strimlary"},
{"Close stream", "Yap strim"}, {"Close stream", "Yap strim"},
// ShowI2CPLocalDestination
{"I2CP session not found", "I2CP Sessiýa tapylmady"}, {"I2CP session not found", "I2CP Sessiýa tapylmady"},
{"I2CP is not enabled", "I2CP goşulmaýar"}, {"I2CP is not enabled", "I2CP goşulmaýar"},
// ShowLeasesSets
{"Invalid", "Nädogry"}, {"Invalid", "Nädogry"},
{"Store type", "Ammar görnüşi"}, {"Store type", "Ammar görnüşi"},
{"Expires", "Möhleti gutarýar"}, {"Expires", "Möhleti gutarýar"},
@ -170,51 +117,38 @@ namespace turkmen // language namespace
{"TunnelID", "Tuneliň ID"}, {"TunnelID", "Tuneliň ID"},
{"EndDate", "Gutarýar"}, {"EndDate", "Gutarýar"},
{"not floodfill", "fludfil däl"}, {"not floodfill", "fludfil däl"},
// ShowTunnels
{"Queue size", "Nobatyň ululygy"}, {"Queue size", "Nobatyň ululygy"},
// ShowCommands
{"Run peer test", "Synag başlaň"}, {"Run peer test", "Synag başlaň"},
{"Decline transit tunnels", "Tranzit tunellerini ret ediň"}, {"Decline transit tunnels", "Tranzit tunellerini ret ediň"},
{"Accept transit tunnels", "Tranzit tunellerini alyň"}, {"Accept transit tunnels", "Tranzit tunellerini alyň"},
{"Cancel graceful shutdown", "Tekiz durmagy ýatyryň"}, {"Cancel graceful shutdown", "Tekiz durmagy ýatyryň"},
{"Start graceful shutdown", "Tekiz durmak"}, {"Start graceful shutdown", "Tekiz durmak"},
{"Force shutdown", "Mejbury duralga"}, {"Force shutdown", "Mejbury duralga"},
{"<b>Note:</b> any action done here are not persistent and not changes your config files.", {"Reload external CSS styles", "Daşarky CSS stillerini täzeden ýükläň"},
"<b>Bellik:</b> Bu ýerde öndürilen islendik çäre hemişelik däl we konfigurasiýa faýllaryňyzy üýtgetmeýär."}, {"<b>Note:</b> any action done here are not persistent and not changes your config files.", "<b>Bellik:</b> Bu ýerde öndürilen islendik çäre hemişelik däl we konfigurasiýa faýllaryňyzy üýtgetmeýär."},
{"Logging level", "Giriş derejesi"}, {"Logging level", "Giriş derejesi"},
{"Transit tunnels limit", "Tranzit tunelleriniň çägi"}, {"Transit tunnels limit", "Tranzit tunelleriniň çägi"},
{"Change", "Üýtgetmek"}, {"Change", "Üýtgetmek"},
// ShowTransitTunnels {"Change language", "Dil üýtgetmek"},
{"no transit tunnels currently built", "gurlan tranzit tunelleri ýok"}, {"no transit tunnels currently built", "gurlan tranzit tunelleri ýok"},
// ShowSAMSessions/ShowSAMSession
{"SAM disabled", "SAM öçürilen"}, {"SAM disabled", "SAM öçürilen"},
{"SAM session not found", "SAM Sessiýa tapylmady"},
{"no sessions currently running", "başlamagyň sessiýalary ýok"}, {"no sessions currently running", "başlamagyň sessiýalary ýok"},
{"SAM session not found", "SAM Sessiýa tapylmady"},
{"SAM Session", "SAM Sessiýa"}, {"SAM Session", "SAM Sessiýa"},
// ShowI2PTunnels
{"Server Tunnels", "Serwer tunelleri"}, {"Server Tunnels", "Serwer tunelleri"},
{"Client Forwards", "Müşderi gönükdirýär"}, {"Client Forwards", "Müşderi gönükdirýär"},
{"Server Forwards", "Serweriň täzeden düzlüleri"}, {"Server Forwards", "Serweriň täzeden düzlüleri"},
// HandlePage
{"Unknown page", "Näbelli sahypa"}, {"Unknown page", "Näbelli sahypa"},
// HandleCommand, ShowError
{"Invalid token", "Nädogry token"}, {"Invalid token", "Nädogry token"},
{"SUCCESS", "Üstünlikli"}, {"SUCCESS", "Üstünlikli"},
{"ERROR", "Ýalňyşlyk"},
{"Unknown command", "Näbelli topar"},
{"Command accepted", "Topar kabul edilýär"},
{"Back to commands list", "Topar sanawyna dolan"},
{"You will be redirected in 5 seconds", "5 sekuntdan soň täzeden ugrukdyrylarsyňyz"},
// HTTP_COMMAND_KILLSTREAM
{"Stream closed", "Strim ýapyk"}, {"Stream closed", "Strim ýapyk"},
{"Stream not found or already was closed", "Strim tapylmady ýa-da eýýäm ýapyldy"}, {"Stream not found or already was closed", "Strim tapylmady ýa-da eýýäm ýapyldy"},
{"Destination not found", "Niýetlenen ýeri tapylmady"}, {"Destination not found", "Niýetlenen ýeri tapylmady"},
{"StreamID can't be null", "StreamID boş bolup bilmez"}, {"StreamID can't be null", "StreamID boş bolup bilmez"},
{"Return to destination page", "Barmaly nokadynyň nokadyna gaýdyp geliň"}, {"Return to destination page", "Barmaly nokadynyň nokadyna gaýdyp geliň"},
{"You will be redirected back in 5 seconds", "5 sekuntda yzyna iberiler"}, {"You will be redirected in 5 seconds", "5 sekuntdan soň täzeden ugrukdyrylarsyňyz"},
// HTTP_COMMAND_LIMITTRANSIT
{"Transit tunnels count must not exceed 65535", "Tranzit tagtalaryň sany 65535-den geçmeli däldir"}, {"Transit tunnels count must not exceed 65535", "Tranzit tagtalaryň sany 65535-den geçmeli däldir"},
// HTTP_COMMAND_GET_REG_STRING {"Back to commands list", "Topar sanawyna dolan"},
{"Register at reg.i2p", "Reg.i2P-de hasaba duruň"}, {"Register at reg.i2p", "Reg.i2P-de hasaba duruň"},
{"Description", "Beýany"}, {"Description", "Beýany"},
{"A bit information about service on domain", "Domendäki hyzmat barada käbir maglumatlar"}, {"A bit information about service on domain", "Domendäki hyzmat barada käbir maglumatlar"},
@ -222,6 +156,44 @@ namespace turkmen // language namespace
{"Domain can't end with .b32.i2p", "Domain .b32.i2p bilen gutaryp bilmez"}, {"Domain can't end with .b32.i2p", "Domain .b32.i2p bilen gutaryp bilmez"},
{"Domain must end with .i2p", "Domeni .i2p bilen gutarmaly"}, {"Domain must end with .i2p", "Domeni .i2p bilen gutarmaly"},
{"Such destination is not found", "Bu barmaly ýer tapylmady"}, {"Such destination is not found", "Bu barmaly ýer tapylmady"},
{"Unknown command", "Näbelli topar"},
{"Command accepted", "Topar kabul edilýär"},
{"Proxy error", "Proksi ýalňyşlygy"},
{"Proxy info", "Proksi maglumat"},
{"Proxy error: Host not found", "Proksi ýalňyşlygy: Host tapylmady"},
{"Remote host not found in router's addressbook", "Uzakdaky öý eýesi marşruteriň salgy kitabynda tapylmady"},
{"You may try to find this host on jump services below", "Aşakdaky böküş hyzmatlarynda bu öý eýesini tapmaga synanyşyp bilersiňiz"},
{"Invalid request", "Nädogry haýyş"},
{"Proxy unable to parse your request", "Proksi haýyşyňyzy derňäp bilmeýär"},
{"addresshelper is not supported", "Salgylandyryjy goldanok"},
{"Host", "Adres"},
{"added to router's addressbook from helper", "marşruteriň adresini kömekçiden goşdy"},
{"Click", "Basyň"},
{"here", "bu ýerde"},
{"to proceed", "dowam etmek"},
{"Addresshelper found", "Forgelper tapyldy"},
{"already in router's addressbook", "marşruteriň adres kitaby"},
{"to update record", "recordazgyny täzelemek üçin"},
{"invalid request uri", "nädogry haýyş URI"},
{"Can't detect destination host from request", "Haýyşdan barmaly ýerini tapyp bilemok"},
{"Outproxy failure", "Daşarky proksi ýalňyşlyk"},
{"bad outproxy settings", "daşarky daşarky proksi sazlamalary nädogry"},
{"not inside I2P network, but outproxy is not enabled", "I2P torunda däl, ýöne daşarky proksi goşulmaýar"},
{"unknown outproxy url", "näbelli daşarky proksi URL"},
{"cannot resolve upstream proxy", "has ýokary proksi kesgitläp bilmeýär"},
{"hostname too long", "hoster eýesi ady gaty uzyn"},
{"cannot connect to upstream socks proxy", "ýokary jorap SOCKS proksi bilen birigip bolmaýar"},
{"Cannot negotiate with socks proxy", "Iň ýokary jorap SOCKS proksi bilen ylalaşyp bilmeýärler"},
{"CONNECT error", "Bagyr haýyşy säwligi"},
{"Failed to Connect", "Birikdirip bilmedi"},
{"socks proxy error", "socks proksi ýalňyşlygy"},
{"failed to send request to upstream", "öý eýesi proksi üçin haýyş iberip bilmedi"},
{"No Reply From socks proxy", "Jorap proksi serwerinden hiç hili jogap ýok"},
{"cannot connect", "birikdirip bilmedi"},
{"http out proxy not implemented", "daşarky HTTP proksi serwerini goldamak amala aşyrylmaýar"},
{"cannot connect to upstream http proxy", "ýokary akym HTTP proksi serwerine birigip bilmedi"},
{"Host is down", "Salgy elýeterli däl"},
{"Can't create connection to requested host, it may be down. Please try again later.", "Talap edilýän salgyda birikmäni gurup bilmedim, onlaýn bolup bilmez. Soňra haýyşy soň gaýtalamaga synanyşyň."},
{"", ""}, {"", ""},
}; };

16
i18n/Ukrainian.cpp

@ -31,8 +31,6 @@ namespace ukrainian // language namespace
static std::map<std::string, std::string> strings static std::map<std::string, std::string> strings
{ {
{"Disabled", "Вимкнуто"},
{"Enabled", "Увімкнуто"},
{"KiB", "КіБ"}, {"KiB", "КіБ"},
{"MiB", "МіБ"}, {"MiB", "МіБ"},
{"GiB", "ГіБ"}, {"GiB", "ГіБ"},
@ -45,10 +43,10 @@ namespace ukrainian // language namespace
{"<b>i2pd</b> webconsole", "Веб-консоль <b>i2pd</b>"}, {"<b>i2pd</b> webconsole", "Веб-консоль <b>i2pd</b>"},
{"Main page", "Головна"}, {"Main page", "Головна"},
{"Router commands", "Команди маршрутизатора"}, {"Router commands", "Команди маршрутизатора"},
{"Local destinations", "Локальні призначення"}, {"Local Destinations", "Локальні Призначення"},
{"LeaseSets", "Лізсети"}, {"LeaseSets", "Лізсети"},
{"Tunnels", "Тунелі"}, {"Tunnels", "Тунелі"},
{"Transit tunnels", "Транзитні тунелі"}, {"Transit Tunnels", "Транзитні Тунелі"},
{"Transports", "Транспорти"}, {"Transports", "Транспорти"},
{"I2P tunnels", "I2P тунелі"}, {"I2P tunnels", "I2P тунелі"},
{"SAM sessions", "SAM сесії"}, {"SAM sessions", "SAM сесії"},
@ -84,9 +82,9 @@ namespace ukrainian // language namespace
{"Routers", "Маршрутизатори"}, {"Routers", "Маршрутизатори"},
{"Floodfills", "Флудфіли"}, {"Floodfills", "Флудфіли"},
{"Client Tunnels", "Клієнтські Тунелі"}, {"Client Tunnels", "Клієнтські Тунелі"},
{"Transit Tunnels", "Транзитні Тунелі"},
{"Services", "Сервіси"}, {"Services", "Сервіси"},
{"Local Destinations", "Локальні Призначення"}, {"Enabled", "Увімкнуто"},
{"Disabled", "Вимкнуто"},
{"Encrypted B33 address", "Шифровані B33 адреси"}, {"Encrypted B33 address", "Шифровані B33 адреси"},
{"Address registration line", "Рядок реєстрації адреси"}, {"Address registration line", "Рядок реєстрації адреси"},
{"Domain", "Домен"}, {"Domain", "Домен"},
@ -126,10 +124,12 @@ namespace ukrainian // language namespace
{"Cancel graceful shutdown", "Скасувати плавну зупинку"}, {"Cancel graceful shutdown", "Скасувати плавну зупинку"},
{"Start graceful shutdown", "Запустити плавну зупинку"}, {"Start graceful shutdown", "Запустити плавну зупинку"},
{"Force shutdown", "Примусова зупинка"}, {"Force shutdown", "Примусова зупинка"},
{"Reload external CSS styles", "Перезавантажити зовнішні стилі CSS"},
{"<b>Note:</b> any action done here are not persistent and not changes your config files.", "<b>Примітка:</b> будь-яка зроблена тут дія не є постійною та не змінює ваші конфігураційні файли."}, {"<b>Note:</b> any action done here are not persistent and not changes your config files.", "<b>Примітка:</b> будь-яка зроблена тут дія не є постійною та не змінює ваші конфігураційні файли."},
{"Logging level", "Рівень логування"}, {"Logging level", "Рівень логування"},
{"Transit tunnels limit", "Обмеження транзитних тунелів"}, {"Transit tunnels limit", "Обмеження транзитних тунелів"},
{"Change", "Змінити"}, {"Change", "Змінити"},
{"Change language", "Змінити мову"},
{"no transit tunnels currently built", "немає побудованих транзитних тунелів"}, {"no transit tunnels currently built", "немає побудованих транзитних тунелів"},
{"SAM disabled", "SAM вимкнуто"}, {"SAM disabled", "SAM вимкнуто"},
{"no sessions currently running", "немає запущених сесій"}, {"no sessions currently running", "немає запущених сесій"},
@ -146,7 +146,7 @@ namespace ukrainian // language namespace
{"Destination not found", "Точка призначення не знайдена"}, {"Destination not found", "Точка призначення не знайдена"},
{"StreamID can't be null", "Ідентифікатор потоку не може бути порожнім"}, {"StreamID can't be null", "Ідентифікатор потоку не може бути порожнім"},
{"Return to destination page", "Повернутися на сторінку точки призначення"}, {"Return to destination page", "Повернутися на сторінку точки призначення"},
{"You will be redirected back in 5 seconds", "Ви будете переадресовані назад через 5 секунд"}, {"You will be redirected in 5 seconds", "Ви будете переадресовані через 5 секунд"},
{"Transit tunnels count must not exceed 65535", "Кількість транзитних тунелів не повинна перевищувати 65535"}, {"Transit tunnels count must not exceed 65535", "Кількість транзитних тунелів не повинна перевищувати 65535"},
{"Back to commands list", "Повернутися до списку команд"}, {"Back to commands list", "Повернутися до списку команд"},
{"Register at reg.i2p", "Зареєструвати на reg.i2p"}, {"Register at reg.i2p", "Зареєструвати на reg.i2p"},
@ -158,7 +158,6 @@ namespace ukrainian // language namespace
{"Such destination is not found", "Така точка призначення не знайдена"}, {"Such destination is not found", "Така точка призначення не знайдена"},
{"Unknown command", "Невідома команда"}, {"Unknown command", "Невідома команда"},
{"Command accepted", "Команда прийнята"}, {"Command accepted", "Команда прийнята"},
{"You will be redirected in 5 seconds", "Ви будете переадресовані через 5 секунд"},
{"Proxy error", "Помилка проксі"}, {"Proxy error", "Помилка проксі"},
{"Proxy info", "Інформація проксі"}, {"Proxy info", "Інформація проксі"},
{"Proxy error: Host not found", "Помилка проксі: Адреса не знайдена"}, {"Proxy error: Host not found", "Помилка проксі: Адреса не знайдена"},
@ -175,7 +174,6 @@ namespace ukrainian // language namespace
{"Addresshelper found", "Знайдено addresshelper"}, {"Addresshelper found", "Знайдено addresshelper"},
{"already in router's addressbook", "вже в адресній книзі маршрутизатора"}, {"already in router's addressbook", "вже в адресній книзі маршрутизатора"},
{"to update record", "щоб оновити запис"}, {"to update record", "щоб оновити запис"},
{"Invalid Request", "Некоректний Запит"},
{"invalid request uri", "некоректний URI запиту"}, {"invalid request uri", "некоректний URI запиту"},
{"Can't detect destination host from request", "Не вдалось визначити адресу призначення з запиту"}, {"Can't detect destination host from request", "Не вдалось визначити адресу призначення з запиту"},
{"Outproxy failure", "Помилка зовнішнього проксі"}, {"Outproxy failure", "Помилка зовнішнього проксі"},

Loading…
Cancel
Save