From 703d18e50d69974779c5fab0d1bb6c082a3923fd Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Mon, 5 Jun 2017 02:49:46 -0500 Subject: feat: add check misspelling (#1877) --- .drone.yml | 1 + .drone.yml.sig | 2 +- Makefile | 15 +++++++++++++++ cmd/serv.go | 2 +- models/gpg_key_test.go | 2 +- options/locale/locale_bg-BG.ini | 2 +- options/locale/locale_cs-CZ.ini | 2 +- options/locale/locale_de-DE.ini | 2 +- options/locale/locale_en-US.ini | 2 +- options/locale/locale_es-ES.ini | 2 +- options/locale/locale_fi-FI.ini | 2 +- options/locale/locale_fr-FR.ini | 2 +- options/locale/locale_it-IT.ini | 2 +- options/locale/locale_ja-JP.ini | 2 +- options/locale/locale_ko-KR.ini | 2 +- options/locale/locale_lv-LV.ini | 2 +- options/locale/locale_nl-NL.ini | 2 +- options/locale/locale_pl-PL.ini | 2 +- options/locale/locale_pt-BR.ini | 2 +- options/locale/locale_ru-RU.ini | 2 +- options/locale/locale_sr-SP.ini | 2 +- options/locale/locale_sv-SE.ini | 2 +- options/locale/locale_tr-TR.ini | 2 +- options/locale/locale_zh-CN.ini | 2 +- options/locale/locale_zh-HK.ini | 2 +- options/locale/locale_zh-TW.ini | 2 +- routers/api/v1/user/gpg_key.go | 2 +- routers/repo/view.go | 2 +- routers/user/setting.go | 2 +- 29 files changed, 43 insertions(+), 27 deletions(-) diff --git a/.drone.yml b/.drone.yml index c6b789e171..00810b8ad9 100644 --- a/.drone.yml +++ b/.drone.yml @@ -20,6 +20,7 @@ pipeline: - make generate - make vet - make lint + - make misspell-check - make test-vendor - make build when: diff --git a/.drone.yml.sig b/.drone.yml.sig index 16c9966d62..9c301a9ec3 100644 --- a/.drone.yml.sig +++ b/.drone.yml.sig @@ -1 +1 @@ -eyJhbGciOiJIUzI1NiJ9.d29ya3NwYWNlOgogIGJhc2U6IC9zcnYvYXBwCiAgcGF0aDogc3JjL2NvZGUuZ2l0ZWEuaW8vZ2l0ZWEKCnBpcGV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OiBwbHVnaW5zL2dpdGh1Yi1yZWxlYXNlCiAgICBmaWxlczoKICAgICAgLSBkaXN0L3JlbGVhc2UvKgogICAgd2hlbjoKICAgICAgZXZlbnQ6IFsgdGFnIF0KICAgICAgYnJhbmNoOiBbIHJlZnMvdGFncy8qIF0KCiAgZ2l0dGVyOgogICAgaW1hZ2U6IHBsdWdpbnMvZ2l0dGVyCgpzZXJ2aWNlczoKICBteXNxbDoKICAgIGltYWdlOiBteXNxbDo1LjcKICAgIGVudmlyb25tZW50OgogICAgICAtIE1ZU1FMX0RBVEFCQVNFPXRlc3QKICAgICAgLSBNWVNRTF9BTExPV19FTVBUWV9QQVNTV09SRD15ZXMKICAgIHdoZW46CiAgICAgIGV2ZW50OiBbIHB1c2gsIHRhZywgcHVsbF9yZXF1ZXN0IF0KCiAgcGdzcWw6CiAgICBpbWFnZTogcG9zdGdyZXM6OS41CiAgICBlbnZpcm9ubWVudDoKICAgICAgLSBQT1NUR1JFU19EQj10ZXN0CiAgICB3aGVuOgogICAgICBldmVudDogWyBwdXNoLCB0YWcsIHB1bGxfcmVxdWVzdCBdCg.L18ZdBOuT65qKtXjuKNRjGy0iRJkefxOGLnyexdmoGw \ No newline at end of file diff --git a/Makefile b/Makefile index 6b0c0327a4..2566677d68 100644 --- a/Makefile +++ b/Makefile @@ -12,6 +12,7 @@ LDFLAGS := -X "main.Version=$(shell git describe --tags --always | sed 's/-/+/' PACKAGES ?= $(filter-out code.gitea.io/gitea/integrations,$(shell go list ./... | grep -v /vendor/)) SOURCES ?= $(shell find . -name "*.go" -type f) +GOFILES := $(shell find . -name "*.go" -type f -not -path "./vendor/*") TAGS ?= @@ -73,6 +74,20 @@ lint: fi for PKG in $(PACKAGES); do golint -set_exit_status $$PKG || exit 1; done; +.PHONY: misspell-check +misspell-check: + @hash misspell > /dev/null 2>&1; if [ $$? -ne 0 ]; then \ + go get -u github.com/client9/misspell/cmd/misspell; \ + fi + misspell -error -i unknwon $(GOFILES) + +.PHONY: misspell +misspell: + @hash misspell > /dev/null 2>&1; if [ $$? -ne 0 ]; then \ + go get -u github.com/client9/misspell/cmd/misspell; \ + fi + misspell -w -i unknwon $(GOFILES) + .PHONY: test test: go test $(PACKAGES) diff --git a/cmd/serv.go b/cmd/serv.go index 277790d4ca..4e3b9de2f9 100644 --- a/cmd/serv.go +++ b/cmd/serv.go @@ -185,7 +185,7 @@ func runServ(c *cli.Context) error { } else if lfsVerb == "download" { requestedMode = models.AccessModeRead } else { - fail("Unknown LFS verb", "Unkown lfs verb %s", lfsVerb) + fail("Unknown LFS verb", "Unknown lfs verb %s", lfsVerb) } } diff --git a/models/gpg_key_test.go b/models/gpg_key_test.go index d291ce91c0..507cfabd23 100644 --- a/models/gpg_key_test.go +++ b/models/gpg_key_test.go @@ -140,7 +140,7 @@ parent fd3577542f7ad1554c7c7c0eb86bb57a1324ad91 author Antoine GIRARD 1489013107 +0100 committer Antoine GIRARD 1489013107 +0100 -Unkonwn GPG key with good email +Unknown GPG key with good email ` //Reading Sign goodSig, err := extractSignature(testGoodSigArmor) diff --git a/options/locale/locale_bg-BG.ini b/options/locale/locale_bg-BG.ini index a4fbd68090..14a14b1dc1 100644 --- a/options/locale/locale_bg-BG.ini +++ b/options/locale/locale_bg-BG.ini @@ -330,7 +330,7 @@ tokens_desc=Генерирани API ключове, които могат да new_token_desc=Всеки API ключ ще има пълен достъп до Вашия профил. token_name=Име на API ключ generate_token=Генериране на API ключ -generate_token_succees=Успешно е генериран API ключ за достъп. Уверете се, че сте го копирали, тъй като няма да можете да го видите отново! +generate_token_success=Успешно е генериран API ключ за достъп. Уверете се, че сте го копирали, тъй като няма да можете да го видите отново! delete_token=Изтрий access_token_deletion=Изтрий индивидуален API ключ за достъп access_token_deletion_desc=При изтриване на този индивидуален API ключ за достъп ще се премахнат всички свързани права на приложението. Желаете ли да продължите? diff --git a/options/locale/locale_cs-CZ.ini b/options/locale/locale_cs-CZ.ini index 05db4b1f75..e3843d8ee4 100644 --- a/options/locale/locale_cs-CZ.ini +++ b/options/locale/locale_cs-CZ.ini @@ -330,7 +330,7 @@ tokens_desc=Poukázky, které jste vygeneroval, mohou být použity pro přístu new_token_desc=Každá poukázka má úplný přístup k vašemu účtu. token_name=Název poukázky generate_token=Vygenerovat poukázku -generate_token_succees=Vaše přístupová poukázka byl úspěšně vygenerován. Nyní si ji zkopírujte, neboť později to již nebude možné! +generate_token_success=Vaše přístupová poukázka byl úspěšně vygenerován. Nyní si ji zkopírujte, neboť později to již nebude možné! delete_token=Smazat access_token_deletion=Smazání osobní přístupové poukázky access_token_deletion_desc=Smazáním této osobní přístupové poukázky odstraní všechen návazný přístup aplikace. Chcete pokračovat? diff --git a/options/locale/locale_de-DE.ini b/options/locale/locale_de-DE.ini index efeb859fca..8741334889 100644 --- a/options/locale/locale_de-DE.ini +++ b/options/locale/locale_de-DE.ini @@ -356,7 +356,7 @@ tokens_desc=Die von Ihnen erzeugten Token können zum Zugriff auf die Gitea-API new_token_desc=Jeder Token ermöglicht vollen Zugriff auf dein Konto. token_name=Token-Name generate_token=Token generieren -generate_token_succees=Dein Zugangs-Token wurde erfolgreich generiert! Stelle sicher, dass du den Token kopiert hast, da du ihn später nicht mehr betrachten kannst! +generate_token_success=Dein Zugangs-Token wurde erfolgreich generiert! Stelle sicher, dass du den Token kopiert hast, da du ihn später nicht mehr betrachten kannst! delete_token=Löschen access_token_deletion=Persönlichen Token entfernen access_token_deletion_desc=Das Löschen dieses persönlichen Zugangs-Tokens wird alle zugehörigen Zugriffe der Anwendung entfernen. Möchtest du fortfahren? diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 00b374835f..c2df7f27dc 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -402,7 +402,7 @@ tokens_desc = Tokens you have generated which can be used to access the Gitea AP new_token_desc = Each token will have full access to your account. token_name = Token Name generate_token = Generate Token -generate_token_succees = Your access token was successfully generated! Be sure to copy it right now, because you will not be able to see it again later! +generate_token_success = Your access token was successfully generated! Be sure to copy it right now, because you will not be able to see it again later! delete_token = Delete access_token_deletion = Personal Access Token Deletion access_token_deletion_desc = Delete this personal access token will revoke access for any application using this token. Do you want to continue? diff --git a/options/locale/locale_es-ES.ini b/options/locale/locale_es-ES.ini index 97e5629177..b0de46070d 100644 --- a/options/locale/locale_es-ES.ini +++ b/options/locale/locale_es-ES.ini @@ -324,7 +324,7 @@ tokens_desc=Tokens usados para acceder al API de Gitea. new_token_desc=Desde ahora, todos los tokens tendrán acceso completo a tu cuenta. token_name=Nombre del Token generate_token=Generar Token -generate_token_succees=¡Los nuevos tokens de acceso se han generado correctamente! Asegúrate de copiar tu nuevo token de acceso personal. ¡No podrás verlo de nuevo! +generate_token_success=¡Los nuevos tokens de acceso se han generado correctamente! Asegúrate de copiar tu nuevo token de acceso personal. ¡No podrás verlo de nuevo! delete_token=Eliminar access_token_deletion=Borrado de Token de Acceso Personal access_token_deletion_desc=Si elimina este token de acceso personal la aplicación asociada perderá el permiso de acceso. ¿Desea continuar? diff --git a/options/locale/locale_fi-FI.ini b/options/locale/locale_fi-FI.ini index 884f1d9d35..ec8361b141 100644 --- a/options/locale/locale_fi-FI.ini +++ b/options/locale/locale_fi-FI.ini @@ -330,7 +330,7 @@ tokens_desc=Luomiasi pääsymerkkejä voidaan käyttää Gitea APIn kanssa. new_token_desc=Joka pääsymerkillä on täysi pääsy tiliisi. token_name=Pääsymerkin nimi generate_token=Luo pääsymerkki -generate_token_succees=Pääsymerkkisi luotiin onnistuneesti! Varmista että kopioit sen juuri nyt, koska et voi nähdä sitä uudelleen myöhemmin! +generate_token_success=Pääsymerkkisi luotiin onnistuneesti! Varmista että kopioit sen juuri nyt, koska et voi nähdä sitä uudelleen myöhemmin! delete_token=Poista access_token_deletion=Henkilökohtaisen pääsymerkin poisto access_token_deletion_desc=Tämän henkilökohtaisen pääsymerkin poistaminen poistaa kaikki siihen liittyvät pääsyt sovellukseen. Haluatko jatkaa? diff --git a/options/locale/locale_fr-FR.ini b/options/locale/locale_fr-FR.ini index 4e80257c11..9e4c9c086d 100644 --- a/options/locale/locale_fr-FR.ini +++ b/options/locale/locale_fr-FR.ini @@ -353,7 +353,7 @@ tokens_desc=Jetons, que vous avez généré, qui peuvent être utilisés pour ac new_token_desc=Chaque Jeton donnera un accès complet à votre compte. token_name=Nom du jeton generate_token=Générer le jeton -generate_token_succees=Nouveau jeton d'accès a été généré avec succès ! Assurez-vous de copier votre nouveau jeton d'accès personnel maintenant. Vous ne serez pas en mesure de le revoir ! +generate_token_success=Nouveau jeton d'accès a été généré avec succès ! Assurez-vous de copier votre nouveau jeton d'accès personnel maintenant. Vous ne serez pas en mesure de le revoir ! delete_token=Supprimer access_token_deletion=Suppression du jeton d'accès access_token_deletion_desc=Supprimer ce jeton d'accès supprimera tous les accès de l'application. Voulez-vous continuer ? diff --git a/options/locale/locale_it-IT.ini b/options/locale/locale_it-IT.ini index 29b9d2024c..20ed3959d5 100644 --- a/options/locale/locale_it-IT.ini +++ b/options/locale/locale_it-IT.ini @@ -337,7 +337,7 @@ tokens_desc=I Token che hai generato e che possono essere utilizzati per acceder new_token_desc=Da questo momento, ogni token avrà pieno accesso al tuo account. token_name=Nome Token generate_token=Genera Token -generate_token_succees=Nuovo token di accesso generato con successo! Assicurarsi di copiare il nuovo token di accesso personale ora: non sarà possibile visualizzarlo nuovamente! +generate_token_success=Nuovo token di accesso generato con successo! Assicurarsi di copiare il nuovo token di accesso personale ora: non sarà possibile visualizzarlo nuovamente! delete_token=Elimina access_token_deletion=Eliminazione Token di accesso personale access_token_deletion_desc=Eliminare questo token di accesso personale rimuoverà tutti i relativi accessi di applicazione. Si desidera continuare? diff --git a/options/locale/locale_ja-JP.ini b/options/locale/locale_ja-JP.ini index dc1012ac14..868bf4e04e 100644 --- a/options/locale/locale_ja-JP.ini +++ b/options/locale/locale_ja-JP.ini @@ -321,7 +321,7 @@ tokens_desc=生成したトークンを利用して Gitea の API にアクセ new_token_desc=今のところ、全てのトークンはあなたのアカウントにフルアクセスできます。 token_name=トークン名 generate_token=トークンを生成 -generate_token_succees=新しいアクセス トークンは正常に生成されました !今すぐあなたの新しいアクセス トークンをコピーしておいてください。二度と見ることはできませんので確認してください! +generate_token_success=新しいアクセス トークンは正常に生成されました !今すぐあなたの新しいアクセス トークンをコピーしておいてください。二度と見ることはできませんので確認してください! delete_token=削除 access_token_deletion=パーソナルアクセストークンの削除 access_token_deletion_desc=パーソナルアクセストークンを削除すると、関連するアプリケーションのすべてのアクセスが削除されます。続行しますか? diff --git a/options/locale/locale_ko-KR.ini b/options/locale/locale_ko-KR.ini index 04fa32934b..deef0b2948 100644 --- a/options/locale/locale_ko-KR.ini +++ b/options/locale/locale_ko-KR.ini @@ -328,7 +328,7 @@ tokens_desc=Gitea Api에 액세스 하는 데 사용할 수 있는 토큰입니 new_token_desc=각 토큰은 당신의 모든 권한을 행사할 수 있습니다. token_name=토큰 이름 generate_token=토큰 생성 -generate_token_succees=액세스 토큰이 생성되었습니다. 이번에만 확인할 수 있으니 잘 보관하세요. +generate_token_success=액세스 토큰이 생성되었습니다. 이번에만 확인할 수 있으니 잘 보관하세요. delete_token=삭제 access_token_deletion=개인 액세스 토큰 삭제 access_token_deletion_desc=이 토큰을 사용하는 애플리케이션의 접근권한 또한 삭제됩니다. 계속 하시겠습니까? diff --git a/options/locale/locale_lv-LV.ini b/options/locale/locale_lv-LV.ini index 5ca65957ed..7035c4da58 100644 --- a/options/locale/locale_lv-LV.ini +++ b/options/locale/locale_lv-LV.ini @@ -330,7 +330,7 @@ tokens_desc=Taloni, kurus esat uzģenerējuši, kas var tikt izmantoti, lai piek new_token_desc=Pašlaik visiem taloniem ir pilna piekļuve Jūsu kontam. token_name=Talona nosaukums generate_token=Ģenerēt talonu -generate_token_succees=Jauns piekļuves talons tika veiksmīgi uzģenerēts! Pārliecinieties, ka esat to nokopējis, jo to Jums vairāk nebūs iespēja izdarīt! +generate_token_success=Jauns piekļuves talons tika veiksmīgi uzģenerēts! Pārliecinieties, ka esat to nokopējis, jo to Jums vairāk nebūs iespēja izdarīt! delete_token=Dzēst access_token_deletion=Personīgā piekļuves talona dzēšana access_token_deletion_desc=Dzēšot personīgo piekļuves talonu, tiks liegta piekļuve aplikācijām, kas to izmanto. Vai vēlaties turpināt? diff --git a/options/locale/locale_nl-NL.ini b/options/locale/locale_nl-NL.ini index 0c497268b8..534360eec5 100644 --- a/options/locale/locale_nl-NL.ini +++ b/options/locale/locale_nl-NL.ini @@ -329,7 +329,7 @@ tokens_desc=Tokens die u hebt gegenereerd om toegang tot de Gitea APIs te verkri new_token_desc=Alle tokens hebben volledig toegang tot uw account. token_name=Symbolische naam generate_token=Token genereren -generate_token_succees=Nieuw toegangstoken is met succes gegenereerd! Kopieer uw toegangstoken nu. Dit is de enige keer dat u uw toegangstoken te zien krijgt! +generate_token_success=Nieuw toegangstoken is met succes gegenereerd! Kopieer uw toegangstoken nu. Dit is de enige keer dat u uw toegangstoken te zien krijgt! delete_token=Verwijderen access_token_deletion=Persoonlijke toegangstoken verwijderen access_token_deletion_desc=Verwijderen van dit persoonlijke toegangstoken zal alle verwante toegang verwijderen. Wilt u doorgaan? diff --git a/options/locale/locale_pl-PL.ini b/options/locale/locale_pl-PL.ini index 15a208af15..6a10540e06 100644 --- a/options/locale/locale_pl-PL.ini +++ b/options/locale/locale_pl-PL.ini @@ -326,7 +326,7 @@ tokens_desc=Tokeny, które wygenerowałeś, mogą być użyte do dostępu do API new_token_desc=Jak na razie, każdy token zapewnia pełen dostęp do Twojego konta. token_name=Nazwa tokena generate_token=Wygeneruj token -generate_token_succees=Nowy token dostępu został wygenerowany pomyślnie! Upewnij się, że teraz go skopiowałeś. Nie będziesz mógł go zobaczyć ponownie! +generate_token_success=Nowy token dostępu został wygenerowany pomyślnie! Upewnij się, że teraz go skopiowałeś. Nie będziesz mógł go zobaczyć ponownie! delete_token=Usuń access_token_deletion=Usuwanie osobistego tokena dostępu access_token_deletion_desc=Usunięcie tego tokena osobistego dostęp spowoduje usunięcie wszystkich powiązanych dostępów do aplikacji. Czy chcesz kontynuować? diff --git a/options/locale/locale_pt-BR.ini b/options/locale/locale_pt-BR.ini index 11aae9f4bb..03a20cd169 100644 --- a/options/locale/locale_pt-BR.ini +++ b/options/locale/locale_pt-BR.ini @@ -356,7 +356,7 @@ tokens_desc=Tokens gerados por você que podem ser usados para acessar a API do new_token_desc=Por enquanto, todo token terá acesso completo à sua conta. token_name=Nome do token generate_token=Gerar token -generate_token_succees=Novo token de acesso gerado com sucesso! Certifique-se de copiar seu novo token de acesso pessoal agora. Você não poderá vê-lo novamente! +generate_token_success=Novo token de acesso gerado com sucesso! Certifique-se de copiar seu novo token de acesso pessoal agora. Você não poderá vê-lo novamente! delete_token=Excluir access_token_deletion=Exclusão do token de acesso pessoal access_token_deletion_desc=Ao excluir este token de acesso pessoal será removido todos os acessos do aplicativo. Você deseja continuar? diff --git a/options/locale/locale_ru-RU.ini b/options/locale/locale_ru-RU.ini index 2df1a5aba5..ed01472d56 100644 --- a/options/locale/locale_ru-RU.ini +++ b/options/locale/locale_ru-RU.ini @@ -337,7 +337,7 @@ tokens_desc=Созданные вами токены могут использо new_token_desc=Пока что каждый токен будет иметь полный доступ к вашей учетной записи. token_name=Имя маркера generate_token=Генерировать маркер -generate_token_succees=Успешно создан новый токен доступа! Пожалуйста сделайте копию вашего нового токена персонального доступа. Вы не сможете увидеть его снова! +generate_token_success=Успешно создан новый токен доступа! Пожалуйста сделайте копию вашего нового токена персонального доступа. Вы не сможете увидеть его снова! delete_token=Удалить access_token_deletion=Удаление личного токена доступа access_token_deletion_desc=Удаление этого персонального токена доступа приведет к удалению всех связанных прав доступа к приложению. Вы хотите продолжить? diff --git a/options/locale/locale_sr-SP.ini b/options/locale/locale_sr-SP.ini index 2dc463f346..46e4966cd7 100644 --- a/options/locale/locale_sr-SP.ini +++ b/options/locale/locale_sr-SP.ini @@ -329,7 +329,7 @@ tokens_desc=Tокени се могу користити за приступ н new_token_desc=Сваки API токен ће имати пун приступ вашем налогу. token_name=Име токена generate_token=Генериши токен -generate_token_succees=Успешно креиран нови токен! Молимо вас да направите копију овог токена, не ће се моћи видети накнадно! +generate_token_success=Успешно креиран нови токен! Молимо вас да направите копију овог токена, не ће се моћи видети накнадно! delete_token=Уклони access_token_deletion=Уклоњење токена личног приступа access_token_deletion_desc=Уклоњење овог токена ће онемогућити сав приступ. Да ли желите да наставите? diff --git a/options/locale/locale_sv-SE.ini b/options/locale/locale_sv-SE.ini index 679ad43782..fad9efcf7e 100644 --- a/options/locale/locale_sv-SE.ini +++ b/options/locale/locale_sv-SE.ini @@ -353,7 +353,7 @@ tokens_desc=Tokens som du har genererat kan användas för åtkomst av Gitea API new_token_desc=Varje token har full tillgång till ditt konto. token_name=Tokennamn generate_token=Generera Token -generate_token_succees=Din åtkomst-token har genererats! Se till att kopiera den nu, eftersom du inte kommer att kunna se den igen senare! +generate_token_success=Din åtkomst-token har genererats! Se till att kopiera den nu, eftersom du inte kommer att kunna se den igen senare! delete_token=Radera access_token_deletion=Borttagning Av Personlig Åtkomsttoken access_token_deletion_desc=Borttagning av denna personliga åtkomsttoken kommer att ta bort all relaterad åtkomst för applikationer. Vill du fortsätta? diff --git a/options/locale/locale_tr-TR.ini b/options/locale/locale_tr-TR.ini index 0f6cd8ef37..4b38ca54b6 100644 --- a/options/locale/locale_tr-TR.ini +++ b/options/locale/locale_tr-TR.ini @@ -321,7 +321,7 @@ tokens_desc=Ürettiğiniz erişim anahtarları, Gitea API'lerine erişimde kulla new_token_desc=Her bir erişim anahtarının hesabınıza tam erişim yetkisi olacaktır. token_name=Erişim Anahtarı İsmi generate_token=Erişim Anahtarı Üret -generate_token_succees=Erişim anahtarınız başarıyla üretilmiştir! Bir daha göremeyeceğiniz için hemen şimdi bir yere kopyaladığınızdan emin olun! +generate_token_success=Erişim anahtarınız başarıyla üretilmiştir! Bir daha göremeyeceğiniz için hemen şimdi bir yere kopyaladığınızdan emin olun! delete_token=Sil access_token_deletion=Kişisel Erişim Anahtarını Silme access_token_deletion_desc=Bu kişisel erişim anahtarını silerseniz uygulamanıza ilişkin tüm erişimler de kaldırılacaktır. Devam etmek istiyor musunuz? diff --git a/options/locale/locale_zh-CN.ini b/options/locale/locale_zh-CN.ini index c9c3927a68..39dc2ef404 100644 --- a/options/locale/locale_zh-CN.ini +++ b/options/locale/locale_zh-CN.ini @@ -356,7 +356,7 @@ tokens_desc=您可以使用这些已生成的令牌来操作 Gitea API。 new_token_desc=目前为止,任何令牌都对您的帐户拥有完整的操作权限。 token_name=令牌名称 generate_token=生成令牌 -generate_token_succees=新的操作令牌生成成功!您必须立即复制到一个安全的地方,因为该令牌只会显示一次! +generate_token_success=新的操作令牌生成成功!您必须立即复制到一个安全的地方,因为该令牌只会显示一次! delete_token=删除令牌 access_token_deletion=删除个人操作令牌操作 access_token_deletion_desc=删除该个人操作令牌将删除所有相关的应用程序的访问权限。是否继续? diff --git a/options/locale/locale_zh-HK.ini b/options/locale/locale_zh-HK.ini index 5768252502..d2391a0f1e 100644 --- a/options/locale/locale_zh-HK.ini +++ b/options/locale/locale_zh-HK.ini @@ -338,7 +338,7 @@ tokens_desc=您所產生的token將被用來存取Gitea APIs new_token_desc=目前為止,任何令牌都對您的帳戶擁有完整的操作權限。 token_name=令牌名稱 generate_token=生成令牌 -generate_token_succees=新的操作令牌生成成功!您必須立即複製到一個安全的地方,因為該令牌只會顯示一次! +generate_token_success=新的操作令牌生成成功!您必須立即複製到一個安全的地方,因為該令牌只會顯示一次! delete_token=删除令牌 access_token_deletion=刪除個人的連接token access_token_deletion_desc=刪除此連接token將會刪除與相關應用程式的連結。您想要繼續嗎? diff --git a/options/locale/locale_zh-TW.ini b/options/locale/locale_zh-TW.ini index 4f337dc29f..5f9b2b8b23 100644 --- a/options/locale/locale_zh-TW.ini +++ b/options/locale/locale_zh-TW.ini @@ -353,7 +353,7 @@ tokens_desc=您所產生的token將被用來存取Gitea APIs new_token_desc=目前為止,任何令牌都對您的帳戶擁有完整的操作權限。 token_name=令牌名稱 generate_token=生成令牌 -generate_token_succees=新的操作令牌生成成功!您必須立即複製到一個安全的地方,因為該令牌只會顯示一次! +generate_token_success=新的操作令牌生成成功!您必須立即複製到一個安全的地方,因為該令牌只會顯示一次! delete_token=删除令牌 access_token_deletion=刪除個人的連接token access_token_deletion_desc=刪除此連接token將會刪除與相關應用程式的連結。您想要繼續嗎? diff --git a/routers/api/v1/user/gpg_key.go b/routers/api/v1/user/gpg_key.go index 678816ccda..8c5e171b7f 100644 --- a/routers/api/v1/user/gpg_key.go +++ b/routers/api/v1/user/gpg_key.go @@ -146,7 +146,7 @@ func HandleAddGPGKeyError(ctx *context.APIContext, err error) { case models.IsErrGPGKeyAccessDenied(err): ctx.Error(422, "", "You do not have access to this gpg key") case models.IsErrGPGKeyIDAlreadyUsed(err): - ctx.Error(422, "", "A key with the same keyid is allready in database") + ctx.Error(422, "", "A key with the same keyid is already in database") default: ctx.Error(500, "AddGPGKey", err) } diff --git a/routers/repo/view.go b/routers/repo/view.go index 17aa8701e2..a3c42a0fdd 100644 --- a/routers/repo/view.go +++ b/routers/repo/view.go @@ -190,7 +190,7 @@ func renderFile(ctx *context.Context, entry *git.TreeEntry, treeLink, rawLink st tp := markup.Type(blob.Name()) isSupportedMarkup := tp != "" - // FIXME: currently set IsMarkdown for compitable + // FIXME: currently set IsMarkdown for compatible ctx.Data["IsMarkdown"] = isSupportedMarkup readmeExist := isSupportedMarkup || markup.IsReadmeFile(blob.Name()) diff --git a/routers/user/setting.go b/routers/user/setting.go index f0cb9e7843..1cc6012820 100644 --- a/routers/user/setting.go +++ b/routers/user/setting.go @@ -489,7 +489,7 @@ func SettingsApplicationsPost(ctx *context.Context, form auth.NewAccessTokenForm return } - ctx.Flash.Success(ctx.Tr("settings.generate_token_succees")) + ctx.Flash.Success(ctx.Tr("settings.generate_token_success")) ctx.Flash.Info(t.Sha1) ctx.Redirect(setting.AppSubURL + "/user/settings/applications") -- cgit v1.2.3