Skip to content

Commit

Permalink
feature: pt-BR localized error messages
Browse files Browse the repository at this point in the history
Signed-off-by: Nick Gerakines <12125+ngerakines@users.noreply.github.com>
  • Loading branch information
ngerakines committed Sep 2, 2024
1 parent 7a29cc4 commit 71ab0e8
Show file tree
Hide file tree
Showing 4 changed files with 207 additions and 34 deletions.
5 changes: 5 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,19 @@ axum-extra = { version = "0.9.3", default-features = false, features = ["cookie"
axum-template = { version = "2.4.0", features = ["minijinja", "minijinja-autoreload"] }
base64 = { version = "0.22.1", default-features = false, features = ["alloc", "std"] }
chrono = { version = "0.4.38", default-features = false, features = ["std", "alloc", "now"] }
fluent = "0.16.1"
fluent-bundle = "0.15.3"
fluent-syntax = { version = "0.11.1", default-features = false }
fontdb = "0.21.0"
headers = { version = "0.4.0", default-features = false }
intl-memoizer = { version = "0.5.2", default-features = false }
minijinja = { version = "2.1.2", default-features = false, features = ["builtins", "deserialization", "json", "loader", "macros", "multi_template", "serde", "std_collections", "urlencode"] }
minijinja-autoreload = { version = "2.1.2", default-features = false, optional = true, features = ["watch-fs"] }
minijinja-embed = {version = "2.0.3", optional = true}
p256 = { version = "0.13.2", default-features = false, features = ["alloc", "arithmetic", "digest", "ecdsa", "ecdsa-core", "jwk", "sha256"] }
reqwest = { version = "0.12.7", default-features = false, features = ["http2", "json", "rustls-tls"] }
resvg = "0.43.0"
rust-embed = "8.5.0"
serde = { version = "1.0.209", default-features = false, features = ["alloc", "derive", "rc", "std"] }
serde_ipld_dagcbor = { version = "0.6.1", default-features = false, features = ["std"] }
thiserror = "1.0.63"
Expand Down
28 changes: 28 additions & 0 deletions i18n/en/errors.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
ERROR-300 = Invalid Language
ERROR-1000 = AT-URI Invalid
ERROR-1001 = AT-URI Missing DID
ERROR-1002 = AT-URI Missing Collection
ERROR-1003 = AT-URI Missing Record Key
ERROR-1004 = AT-URI Has Extra Components
ERROR-1101 = DID Invalid
ERROR-1102 = DID Method Unsupported
ERROR-1150 = Unsupported NSID
ERROR-1200 = PLC Request Failed
ERROR-1201 = PLC Response Invalid
ERROR-1202 = PLC Response Missing Service
ERROR-1210 = PDS Get Record Request Failed
ERROR-1211 = PDS Get Record Response Invalid
ERROR-1300 = JSON Web Key Set URL Invalid
ERROR-1301 = JSON Web Key Set URL Not Authentic
ERROR-1302 = JSON Web Key Set URL Request Failed
ERROR-1303 = JSON Web Key Set URL Response Invalid
ERROR-1304 = JSON Web Key Set URL Response Missing Keys
ERROR-1305 = Secret Key From JWK Failed
ERROR-1400 = Record Proof Missing
ERROR-1401 = Record Proof Key ID Mismatch
ERROR-1402 = Record Serialization Failed
ERROR-1403 = Failed to create signature
ERROR-1404 = Failed to verify signature
ERROR-1500 = Base64 decoding failed
ERROR-1501 = Base64 decoding failed
ERROR-0 = Unhandled Error
28 changes: 28 additions & 0 deletions i18n/pt-BR/errors.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
ERROR-300 = Linguagem inválida
ERROR-1000 = AT-URI Inválido
ERROR-1001 = DID ausente no AT-URI
ERROR-1002 = Coleção ausente do AT-URI
ERROR-1003 = Chave de registro ausente do AT-URI
ERROR-1004 = O AT-URI tem componentes extras
ERROR-1101 = DID Inválido
ERROR-1102 = Método DID sem suporte
ERROR-1150 = NSID sem suporte
ERROR-1200 = Falha na solicitação de PLC
ERROR-1201 = Resposta do PLC inválida
ERROR-1202 = Serviço ausente de resposta PLC
ERROR-1210 = Falha na solicitação de obtenção de registro do PDS
ERROR-1211 = PDS Obter Resposta de Registro Inválida
ERROR-1300 = JSON Web Key Set URL Inválido
ERROR-1301 = JSON Web Key Set URL Não autêntico
ERROR-1302 = JSON Web Key Set URL Falha na solicitação
ERROR-1303 = JSON Web Key Set URL Resposta inválida
ERROR-1304 = JSON Web Key Set URL Chaves ausentes de resposta
ERROR-1305 = Secret Key From JWK Failed
ERROR-1400 = Prova de registro ausente
ERROR-1401 = Incompatibilidade de chave à prova de registro
ERROR-1402 = Falha na serialização do registro
ERROR-1403 = Falha ao criar assinatura
ERROR-1404 = Falha ao verificar a assinatura
ERROR-1500 = Base64 Falha na decodificação
ERROR-1501 = Base64 Falha na decodificação
ERROR-0 = Erro não tratado
Loading

0 comments on commit 71ab0e8

Please sign in to comment.