File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change 45
45
- uses : robinraju/release-downloader@v1
46
46
with :
47
47
repository : nezhahq/user-frontend
48
- tag : v1.0.6
48
+ tag : v1.0.7
49
49
fileName : dist.zip
50
50
latest : true
51
51
extract : true
Original file line number Diff line number Diff line change 5
5
"bytes"
6
6
"fmt"
7
7
"log"
8
+ "strings"
8
9
9
10
"github.com/nezhahq/nezha/pkg/i18n"
10
11
)
@@ -25,6 +26,7 @@ func loadTranslation() error {
25
26
lang = "zh_CN"
26
27
}
27
28
29
+ lang = strings .Replace (lang , "-" , "_" , 1 )
28
30
data , err := getTranslationArchive (lang )
29
31
if err != nil {
30
32
return err
@@ -35,6 +37,7 @@ func loadTranslation() error {
35
37
}
36
38
37
39
func OnUpdateLang (lang string ) error {
40
+ lang = strings .Replace (lang , "-" , "_" , 1 )
38
41
if Localizer .Exists (lang ) {
39
42
Localizer .SetLanguage (lang )
40
43
return nil
You can’t perform that action at this time.
0 commit comments