annotepage-client 2.28.0 → 2.30.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -62,7 +62,7 @@ the site.
62
62
  | `data-project` | the project id, 22 characters. The project is then **confidential**: the key is asked for once per browser. Without either attribute the tool does nothing |
63
63
  | `data-setup` | opens the setup screen, which creates the project and shows the key once. Remove it afterwards |
64
64
  | `data-mode` | `encrypted` (default) or `plain` |
65
- | `data-path` | path prefix: which pages belong to the project. `/fr/` does not annotate `/en/` |
65
+ | `data-path` | path prefix: which pages belong to the project. `/fr/` does not annotate `/en/`. One tool runs per page: several projects on one site means each page loads only its own tag |
66
66
  | `data-domains` | origins of the project, separated by commas |
67
67
  | `data-version` | the version really being served, as the site names it |
68
68
  | `data-environment` | the name of the environment, written into the note as it stands |
@@ -86,15 +86,31 @@ you like without touching the code:
86
86
  before the tag, or a file of your own declared on it with `data-labels`. A
87
87
  missing label falls back on English, so a partial translation is usable.
88
88
 
89
- A complete French set ships in the package, ready for `data-labels` — from the
90
- same CDN and range as the client, nothing to copy into your repository:
89
+ A complete French set ships in the package, and **a French page gets it without
90
+ declaring anything**. A tag served by one of the CDNs above, on a page that says
91
+ `<html lang="fr">` — `fr-CA` and every other region included — loads
92
+ `labels/fr.js` from beside the client, at the version or the range that tag
93
+ pinned. Any other language stays English **and fetches nothing**: asking for a
94
+ file this package has never published would put a 404 in the console of every
95
+ page of the site.
96
+
97
+ Two cases deduce nothing, on purpose, and `data-labels` is the answer to both: a
98
+ copy of the client served by your own site, whose neighbouring files are yours to
99
+ arrange and not ours to guess, and a client configured by `window.annotepageConfig`
100
+ with no tag at all — there is no file address to deduce one from, the same reason
101
+ `server` is required there.
91
102
 
92
103
  ```html
93
104
  data-labels="https://cdn.jsdelivr.net/npm/annotepage-client@2/labels/fr.js"
94
105
  ```
95
106
 
96
- Labels your page set before the tag are kept over it. The same set, as JSON, is
97
- `labels/fr.json`.
107
+ A declared file wins over the page's language — it is how you force one, or ship
108
+ a language nobody else does — and labels your page set before the tag win over
109
+ both. The same set, as JSON, is `labels/fr.json`.
110
+
111
+ The **browser's** language is never consulted, anywhere. Two people in front of
112
+ one screen share the page and not the browser, and a panel that differed between
113
+ them would leave neither able to tell the other what to click.
98
114
 
99
115
  ## What it does not touch
100
116
 
package/dist/HASHES.txt CHANGED
@@ -1,3 +1,5 @@
1
+ 2.30.0 sha384-/pIpSIUKGK7sU+9ZGx0iUTxEY56cWBp5WzJf1XrE+bbNmq1/YQCL0rwiVbgV4z8W 315659 bytes
2
+ 2.29.0 sha384-2N0B7fBqiLD7kE1Jg6ObeS+5JTqFZZWud4icxW2z4qn8qPr3F8CI02LNj429GId9 276739 bytes
1
3
  2.28.0 sha384-aiEeBEhxLgIP0cyZB6FNFRVqATgROwtxEtAmOU3amaBhO06B5IE13Hms8U+dORXp 269981 bytes
2
4
  2.27.0 sha384-aftW4rcvAamPZXxmbvollL8hu9of9Nd17h5XeQY1tjbUf2FEg3a+eAGAw0PQcQ0q 269794 bytes
3
5
  2.26.0 sha384-XepZjJvyM/pXAvgnn+lWKNTpUXZwkix544N2eWFHS5XlkU76LqbFdVdywqkqXu/G 252719 bytes