Skip to content

Commit fe51a8b

Browse files
committed
chore: prepare v2.0.1
1 parent 80e09a6 commit fe51a8b

File tree

4 files changed

+50
-42
lines changed

4 files changed

+50
-42
lines changed

app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "nginx-ui-app-next",
33
"type": "module",
4-
"version": "2.0.0",
4+
"version": "2.0.1",
55
"packageManager": "[email protected]+sha512.6540583f41cc5f628eb3d9773ecee802f4f9ef9923cc45b69890fb47991d4b092964694ec3a4f738a420c918a333062c8b925d312f42e4f0c263eb603551f977",
66
"scripts": {
77
"dev": "vite --host",

app/src/language/generate.ts

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,52 @@
11
// This file is auto-generated. DO NOT EDIT MANUALLY.
22

33
export const msg = [
4-
$gettext('[Nginx UI] Issued certificate successfully'),
5-
$gettext('[Nginx UI] Preparing lego configurations'),
6-
$gettext('[Nginx UI] Writing certificate private key to disk'),
4+
$gettext('Certificate not found: %{error}'),
5+
$gettext('Certificate revoked successfully'),
6+
$gettext('Check if /var/run/docker.sock exists. If you are using Nginx UI Official Docker Image, please make sure the docker socket is mounted like this: `-v /var/run/docker.sock:/var/run/docker.sock`. Nginx UI official image uses /var/run/docker.sock to communicate with the host Docker Engine via Docker Client API. This feature is used to control Nginx in another container and perform container replacement rather than binary replacement during OTA upgrades of Nginx UI to ensure container dependencies are also upgraded. If you don\'t need this feature, please add the environment variable NGINX_UI_IGNORE_DOCKER_SOCKET=true to the container.'),
7+
$gettext('Check if the nginx PID path exists. By default, this path is obtained from \'nginx -V\'. If it cannot be obtained, an error will be reported. In this case, you need to modify the configuration file to specify the Nginx PID path.Refer to the docs for more details: https://nginxui.com/zh_CN/guide/config-nginx.html#pidpath'),
8+
$gettext('Check if the nginx access log path exists. By default, this path is obtained from \'nginx -V\'. If it cannot be obtained or the obtained path does not point to a valid, existing file, an error will be reported. In this case, you need to modify the configuration file to specify the access log path.Refer to the docs for more details: https://nginxui.com/zh_CN/guide/config-nginx.html#accesslogpath'),
9+
$gettext('Check if the nginx configuration directory exists'),
710
$gettext('Check if the nginx configuration entry file exists'),
11+
$gettext('Check if the nginx error log path exists. By default, this path is obtained from \'nginx -V\'. If it cannot be obtained or the obtained path does not point to a valid, existing file, an error will be reported. In this case, you need to modify the configuration file to specify the error log path.Refer to the docs for more details: https://nginxui.com/zh_CN/guide/config-nginx.html#errorlogpath'),
12+
$gettext('Check if the nginx.conf includes the conf.d directory'),
13+
$gettext('Check if the nginx.conf includes the sites-enabled directory'),
14+
$gettext('Check if the nginx.conf includes the streams-enabled directory'),
15+
$gettext('Check if the sites-available and sites-enabled directories are under the nginx configuration directory'),
816
$gettext('Check if the streams-available and streams-enabled directories are under the nginx configuration directory'),
917
$gettext('Docker socket exists'),
10-
$gettext('Check if /var/run/docker.sock exists. If you are using Nginx UI Official Docker Image, please make sure the docker socket is mounted like this: `-v /var/run/docker.sock:/var/run/docker.sock`. Nginx UI official image uses /var/run/docker.sock to communicate with the host Docker Engine via Docker Client API. This feature is used to control Nginx in another container and perform container replacement rather than binary replacement during OTA upgrades of Nginx UI to ensure container dependencies are also upgraded. If you don\'t need this feature, please add the environment variable NGINX_UI_IGNORE_DOCKER_SOCKET=true to the container.'),
11-
$gettext('[Nginx UI] Obtaining certificate'),
12-
$gettext('[Nginx UI] Writing certificate to disk'),
13-
$gettext('Sites directory exists'),
14-
$gettext('Nginx.conf includes conf.d directory'),
15-
$gettext('Log file %{log_path} is not a regular file. If you are using nginx-ui in docker container, please refer to https://nginxui.com/zh_CN/guide/config-nginx-log.html for more information.'),
16-
$gettext('[Nginx UI] Creating client facilitates communication with the CA server'),
17-
$gettext('[Nginx UI] Reloading nginx'),
18-
$gettext('Streams directory exists'),
19-
$gettext('Nginx.conf includes streams-enabled directory'),
18+
$gettext('Failed to delete certificate from database: %{error}'),
2019
$gettext('Failed to revoke certificate: %{error}'),
21-
$gettext('[Nginx UI] Setting DNS01 challenge provider'),
22-
$gettext('[Nginx UI] Environment variables cleaned'),
23-
$gettext('[Nginx UI] Backing up current certificate for later revocation'),
24-
$gettext('[Nginx UI] Finished'),
25-
$gettext('Check if the sites-available and sites-enabled directories are under the nginx configuration directory'),
26-
$gettext('Nginx configuration directory exists'),
27-
$gettext('Check if the nginx configuration directory exists'),
28-
$gettext('[Nginx UI] ACME User: %{name}, Email: %{email}, CA Dir: %{caDir}'),
29-
$gettext('[Nginx UI] Setting environment variables'),
30-
$gettext('[Nginx UI] Certificate was used for server, reloading server TLS certificate'),
20+
$gettext('Log file %{log_path} is not a regular file. If you are using nginx-ui in docker container, please refer to https://nginxui.com/zh_CN/guide/config-nginx-log.html for more information.'),
21+
$gettext('Nginx PID path exists'),
3122
$gettext('Nginx access log path exists'),
32-
$gettext('Check if the nginx access log path exists. By default, this path is obtained from \'nginx -V\'. If it cannot be obtained or the obtained path does not point to a valid, existing file, an error will be reported. In this case, you need to modify the configuration file to specify the access log path.Refer to the docs for more details: https://nginxui.com/zh_CN/guide/config-nginx.html#accesslogpath'),
23+
$gettext('Nginx configuration directory exists'),
24+
$gettext('Nginx configuration entry file exists'),
3325
$gettext('Nginx error log path exists'),
34-
$gettext('Check if the nginx.conf includes the streams-enabled directory'),
35-
$gettext('Failed to delete certificate from database: %{error}'),
36-
$gettext('[Nginx UI] Setting HTTP01 challenge provider'),
37-
$gettext('[Nginx UI] Revoking old certificate'),
38-
$gettext('[Nginx UI] Preparing for certificate revocation'),
39-
$gettext('[Nginx UI] Revoking certificate'),
40-
$gettext('[Nginx UI] Certificate successfully revoked'),
26+
$gettext('Nginx.conf includes conf.d directory'),
4127
$gettext('Nginx.conf includes sites-enabled directory'),
42-
$gettext('Check if the nginx.conf includes the conf.d directory'),
43-
$gettext('Certificate not found: %{error}'),
44-
$gettext('Certificate revoked successfully'),
28+
$gettext('Nginx.conf includes streams-enabled directory'),
29+
$gettext('Sites directory exists'),
30+
$gettext('Streams directory exists'),
31+
$gettext('[Nginx UI] ACME User: %{name}, Email: %{email}, CA Dir: %{caDir}'),
32+
$gettext('[Nginx UI] Backing up current certificate for later revocation'),
4533
$gettext('[Nginx UI] Certificate renewed successfully'),
34+
$gettext('[Nginx UI] Certificate successfully revoked'),
35+
$gettext('[Nginx UI] Certificate was used for server, reloading server TLS certificate'),
36+
$gettext('[Nginx UI] Creating client facilitates communication with the CA server'),
37+
$gettext('[Nginx UI] Environment variables cleaned'),
38+
$gettext('[Nginx UI] Finished'),
39+
$gettext('[Nginx UI] Issued certificate successfully'),
40+
$gettext('[Nginx UI] Obtaining certificate'),
41+
$gettext('[Nginx UI] Preparing for certificate revocation'),
42+
$gettext('[Nginx UI] Preparing lego configurations'),
43+
$gettext('[Nginx UI] Reloading nginx'),
4644
$gettext('[Nginx UI] Revocation completed'),
47-
$gettext('Nginx configuration entry file exists'),
48-
$gettext('Nginx PID path exists'),
49-
$gettext('Check if the nginx PID path exists. By default, this path is obtained from \'nginx -V\'. If it cannot be obtained, an error will be reported. In this case, you need to modify the configuration file to specify the Nginx PID path.Refer to the docs for more details: https://nginxui.com/zh_CN/guide/config-nginx.html#pidpath'),
50-
$gettext('Check if the nginx error log path exists. By default, this path is obtained from \'nginx -V\'. If it cannot be obtained or the obtained path does not point to a valid, existing file, an error will be reported. In this case, you need to modify the configuration file to specify the error log path.Refer to the docs for more details: https://nginxui.com/zh_CN/guide/config-nginx.html#errorlogpath'),
51-
$gettext('Check if the nginx.conf includes the sites-enabled directory'),
45+
$gettext('[Nginx UI] Revoking certificate'),
46+
$gettext('[Nginx UI] Revoking old certificate'),
47+
$gettext('[Nginx UI] Setting DNS01 challenge provider'),
48+
$gettext('[Nginx UI] Setting HTTP01 challenge provider'),
49+
$gettext('[Nginx UI] Setting environment variables'),
50+
$gettext('[Nginx UI] Writing certificate private key to disk'),
51+
$gettext('[Nginx UI] Writing certificate to disk'),
5252
]

app/src/version.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"version":"2.0.0","build_id":1,"total_build":421}
1+
{"version":"2.0.1","build_id":1,"total_build":422}

cmd/translation/gettext.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88
"path/filepath"
99
"regexp"
1010
"runtime"
11+
"sort"
1112
"strings"
1213

1314
"github.com/uozi-tech/cosy/logger"
@@ -241,8 +242,15 @@ func generateSingleTSFile(root string, calls map[string]bool) {
241242
writer.WriteString("// This file is auto-generated. DO NOT EDIT MANUALLY.\n\n")
242243
writer.WriteString("export const msg = [\n")
243244

244-
// Write each translation message
245+
// Extract and sort the translation messages to ensure stable output
246+
var messages []string
245247
for message := range calls {
248+
messages = append(messages, message)
249+
}
250+
sort.Strings(messages)
251+
252+
// Write each translation message in sorted order
253+
for _, message := range messages {
246254
// Escape single quotes and handle newlines in the message for JavaScript
247255
escapedMessage := strings.ReplaceAll(message, "'", "\\'")
248256
// Replace newlines with space to ensure proper formatting in the generated TS file

0 commit comments

Comments
 (0)