瀏覽代碼

Might want to keep English as a valid language...

Jakob Borg 11 年之前
父節點
當前提交
5b9469eed3
共有 3 個文件被更改,包括 6 次插入5 次删除
  1. 0 0
      auto/gui.files.go
  2. 5 4
      cmd/transifexdl/main.go
  3. 1 1
      gui/app.js

File diff suppressed because it is too large
+ 0 - 0
auto/gui.files.go


+ 5 - 4
cmd/transifexdl/main.go

@@ -30,18 +30,19 @@ func main() {
 	var langs []string
 	for code, stat := range stats {
 		shortCode := code[:2]
-		if shortCode == "en" {
-			continue
-		}
 		if pct := 100 * stat.Translated / (stat.Translated + stat.Untranslated); pct < 95 {
 			log.Printf("Skipping language %q (too low completion ratio %d%%)", shortCode, pct)
 			os.Remove("lang-" + shortCode + ".json")
 			continue
 		}
 
+		langs = append(langs, shortCode)
+		if shortCode == "en" {
+			continue
+		}
+
 		log.Printf("Updating language %q", shortCode)
 
-		langs = append(langs, shortCode)
 		resp := req("https://www.transifex.com/api/2/project/syncthing/resource/gui/translation/" + code)
 		var t translation
 		err := json.NewDecoder(resp.Body).Decode(&t)

+ 1 - 1
gui/app.js

@@ -9,7 +9,7 @@
 
 var syncthing = angular.module('syncthing', ['pascalprecht.translate']);
 var urlbase = 'rest';
-var validLangs = ["de","es","fr","pt","sv"];
+var validLangs = ["de","en","es","fr","pt","sv"];
 
 syncthing.config(function ($httpProvider, $translateProvider) {
     $httpProvider.defaults.xsrfHeaderName = 'X-CSRF-Token';

Some files were not shown because too many files changed in this diff