@uxf/scripts 11.74.4 → 11.74.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uxf/scripts",
3
- "version": "11.74.4",
3
+ "version": "11.74.5",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -1,5 +1,6 @@
1
1
  function findTFunctionNamespaces(pageContent) {
2
- const regex = /\bt\("([a-zA-Z0-9\-_]+):([a-zA-Z0-9\-_\.]+)"/g;
2
+ const regex = /\bt\(\s*["A-Za-z0-9_-]([^:"']+):([A-Za-z0-9_-]+)/g;
3
+
3
4
  const matches = pageContent.matchAll(regex);
4
5
  const namespaces = new Set();
5
6
 
@@ -7,7 +7,18 @@ const content = `
7
7
  {t("basic-dash:title-dash")}
8
8
  {t("basicCamel:titleCamel")}
9
9
  {t("basic_underscore:title_underscore")}
10
+ {t(
11
+ "prettier-formatting:title_underscore"
12
+ )}
13
+ {t(
14
+ "prettier-formatting-with-params:title_underscore",
15
+ {
16
+ param: 1,param: 1,param: 1,param: 1,
17
+ param: 1,param: 1,param: 1,param: 1,
18
+ }
19
+ )}
10
20
  </div>
21
+ {TestfunctionEndingwitht("this-should-fail:title_underscore")}
11
22
  <div title={
12
23
  condition
13
24
  ? 'title'
@@ -26,6 +37,8 @@ describe("find namespaces in t functions", function () {
26
37
  "basic-dash",
27
38
  "basicCamel",
28
39
  "basic_underscore",
40
+ "prettier-formatting",
41
+ "prettier-formatting-with-params",
29
42
  "multiline-with-parameters",
30
43
  "with-parameters",
31
44
  "in-translation-parameter",
@@ -60,7 +60,7 @@ function fetcher(url, options) {
60
60
  const headers = {
61
61
  "User-Agent": "got",
62
62
  Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
63
- "Accept-Language": "en-US,en;q=0.9,cs-CZ;q=0.8,cs;q=0.7,de;q=0.6",
63
+ "Accept-Language": "cs-CZ;q=0.8,cs;q=0.7",
64
64
  "Cache-Control": "no-cache",
65
65
  Connection: "keep-alive",
66
66
  Pragma: "no-cache",