Browse Source

docs(module/toxic-swamp): update lang selection

Josh Habdas 11 months ago
parent
commit
8a3ab92792
Signed by: Josh Habdas <jhabdas@protonmail.com> GPG Key ID: B148B31154C75A74
1 changed files with 24 additions and 34 deletions
  1. 24
    34
      docs/content/module/toxic-swamp.md

+ 24
- 34
docs/content/module/toxic-swamp.md View File

@@ -307,7 +307,9 @@ Maximize your incentive with reduced effort by using the [Upgrade Script](/featu
307 307
 
308 308
 ## Create Your Own Proxy
309 309
 
310
-Specify proxy under advanced settings when generating module config. \
310
+Advanced users may wish to configure their own proxy servers.
311
+
312
+advanced settings when running the [Config Generator](#config-generator) and stand up your proxy using the proxy server described in more detail here:
311 313
 
312 314
 <details>
313 315
 <summary>Expand to view details</summary>
@@ -509,57 +511,45 @@ Enable debugging to output detailed socket messages from the proxy to the browse
509 511
 
510 512
 ## Internationalization
511 513
 
512
-Toxic Swamp provides English and Indonesian base translations. Language selection is automatic based on the document's HTML `lang` attribute:
514
+Included languages available for UI presentation:
513 515
 
514
-```html
515
-<html lang="id-ID"><!-- Bahasa Indonesia -->
516
-<html lang="en-US"><!-- American English -->
517
-```
516
+- English
517
+- Indonesian
518
+- Russian
518 519
 
519
-Toggle between langauges using the `languageCode` setting in site config:
520
+Use `languageCode` in site config to control display language:
520 521
 
521 522
 ```toml
522
-languageCode = "id-ID" # Display toolbar in Indonesian
523
-languageCode = "en-UK" # Display toolbar in English
523
+languageCode = "en-US" # English (United States) or English by default
524
+languageCode = "id-ID" # Indonesian (Indonesia) or Indonesian, if available
525
+languageCode = "ru-RU" # Russian (Russia) or Russian, if available
524 526
 ```
525 527
 
526
-If `lang` attribute is not present, the browser language may be used.
528
+{{< hackcss-alert type="info" >}}
529
+<strong>Note:</strong> Language tag syntax is defined by the <abbr title="Internet Engineering Task Force">IETF</abbr>'s {{< external href="https://tools.ietf.org/html/bcp47" text="BCP 47" />}}.
530
+{{< /hackcss-alert >}}
527 531
 
528
-### Customizing Translations
532
+Customize translations without modifying source:
533
+
534
+<details>
535
+<summary>Expand to view details</summary>
529 536
 
530
-Add, modify or remove translations from `inline.jsonld.html` in your site `layouts` directory. If the file doesn't exist yet, copy it from module default:
537
+Modify translations from `inline.jsonld.html` in your site `layouts` directory. If the file doesn't exist yet, copy it from module default:
531 538
 
532 539
 ```sh
533 540
 mkdir -p layouts/partials/modules/toxic-swamp/ && \
534 541
 cp themes/toxic-swamp/layouts/partials/modules/toxic-swamp/inline.jsonld.html $_
535 542
 ```
536 543
 
537
-Follow the `id` and `en` examples provided within. Once you're satisfied with your changes verify the file is well-formed JSON and rebuild your site to view changes. Delete the file to return to module defaults.
538
-
539
-### Specifying Availability
540
-
541
-Adjust language availability using the `translations` setting in site config:
544
+Whitelist available `translations` for module in site config using override:
542 545
 
543 546
 ```toml
544 547
 [params.modules.toxic_swamp]
545
-  translations = ["id", "pt-BR"] # optional, available English translations
548
+  translations = ["id", "ru"] # Override available English translations
546 549
 ```
547 550
 
548
-The example above specifies a Português translation is available in addition to Indonesian. Remove the setting to return to module defaults.
549
-
550
-### Language Selection
551
+Remove any customizations to return to module defaults.
551 552
 
552
-Text presented to the user will appear in a "preferred language". Preferred language is first derived from the `lang` attribute. If left unspecified, the browser's `navigator.language` will be used instead:
553
-
554
-HTML | Browser | Available Translations | Presented Language
555
---- | --- | --- | ---
556
-id-ID | en-US | id | Indonesian
557
-pt-BR | id-ID | id | English
558
--\- | pt-BR | id, pt-BR | Português (Brazilian)
559
--\- | en-UK | id, pt-BR | English
560
-es-ES | es-US | es, es-419, es-ES | Español de España
561
-ru-RU | en-UK | ru | Pу́сский (Russian)
562
-
563
-Regardless of language preference, only [available translations](#specifying-availability) will be presented to the user. If no available translations are specified, English will be used.
553
+</details>
564 554
 
565
-[^1]: Estimate assumes 50%  {{< external href="https://coinhive.com/info/faq#rev-share" text="non-negotiable" />}} Coinhive mining fee compared with 0% for {{< external href="https://moneroocean.stream/?dark#/help/faq" text="MoneroOcean" />}} and excludes optional donation, hashrate variance, uptime, withdrawal fees and optimizations.
555
+[^1]: Estimate assumes 50%  {{< external href="https://coinhive.com/info/faq#rev-share" text="non-negotiable" />}} Coinhive mining fee compared with 0% for {{< external href="https://moneroocean.stream/?dark#/help/faq" text="MoneroOcean" />}} and excludes upgrade incentives, hashrate variance, pool and proxy uptime, withdrawal fees and other optimizations.

Loading…
Cancel
Save