Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spanish translations #127

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
8 changes: 7 additions & 1 deletion sphinx_proof/domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,13 @@
from .proof_type import PROOF_TYPES
from copy import copy

from sphinx.locale import get_translation

logger = logging.getLogger(__name__)

MESSAGE_CATALOG_NAME = "proof"
_ = get_translation(MESSAGE_CATALOG_NAME)


class ProofIndex(Index):

Expand Down Expand Up @@ -156,7 +161,8 @@ def resolve_xref(
number = ".".join(
map(str, env.toc_fignumbers[todocname][typ][target])
)
title = nodes.Text(f"{match['type'].title()} {number}")
# translate title
title = nodes.Text(f"{_(match['type'].title())} {number}")
# builder, fromdocname, todocname, targetid, child, title=None
return make_refnode(builder, fromdocname, todocname, target, title)
else:
Expand Down
2 changes: 1 addition & 1 deletion sphinx_proof/translations/jsons/Algorithm.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"language":"English","symbol":"en","text":"Algorithm"},{"language":"French","symbol":"fr","text":"Algorithme"},{"language":"Italian","symbol":"it","text":"Algoritmo"},{"language":"Czech","symbol":"cs","text":"Algoritmus"}]
[{"language":"English","symbol":"en","text":"Algorithm"},{"language":"French","symbol":"fr","text":"Algorithme"},{"language":"Italian","symbol":"it","text":"Algoritmo"},{"language":"Czech","symbol":"cs","text":"Algoritmus"},{"language":"Spanish","symbol":"es","text":"Algoritmo"},{"language":"German","symbol":"de","text":"Algorithmus"}]
2 changes: 1 addition & 1 deletion sphinx_proof/translations/jsons/Assumption.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"language":"English","symbol":"en","text":"Assumption"}]
[{"language":"English","symbol":"en","text":"Assumption"},{"language":"Spanish", "symbol":"es","text":"Supuesto"},{"language":"German","symbol":"de","text":"Annahme"}]
2 changes: 1 addition & 1 deletion sphinx_proof/translations/jsons/Axiom.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"language":"English","symbol":"en","text":"Axiom"},{"language":"French","symbol":"fr","text":"Axiome"},{"language":"Italian","symbol":"it","text":"Assioma"},{"language":"Czech","symbol":"cs","text":"Axiom"}]
[{"language":"English","symbol":"en","text":"Axiom"},{"language":"French","symbol":"fr","text":"Axiome"},{"language":"Italian","symbol":"it","text":"Assioma"},{"language":"Czech","symbol":"cs","text":"Axiom"},{"language":"Spanish","symbol":"es","text":"Axioma"},{"language":"German","symbol":"de","text":"Axiom"}]
2 changes: 1 addition & 1 deletion sphinx_proof/translations/jsons/Criterion.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"language":"English","symbol":"en","text":"Criterion"},{"language":"French","symbol":"fr","text":"Critère"},{"language":"Italian","symbol":"it","text":"Criterio"},{"language":"Czech","symbol":"cs","text":"Kritérium"}]
[{"language":"English","symbol":"en","text":"Criterion"},{"language":"French","symbol":"fr","text":"Critère"},{"language":"Italian","symbol":"it","text":"Criterio"},{"language":"Czech","symbol":"cs","text":"Kritérium"},{"language":"Spanish","symbol":"es","text":"Criterio"},{"language":"German","symbol":"de","text":"Kriterium"}]
2 changes: 1 addition & 1 deletion sphinx_proof/translations/jsons/Example.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"language":"English","symbol":"en","text":"Example"},{"language":"French","symbol":"fr","text":"Exemple"},{"language":"Italian","symbol":"it","text":"Esempio"},{"language":"Czech","symbol":"cs","text":"Příklad"}]
[{"language":"English","symbol":"en","text":"Example"},{"language":"French","symbol":"fr","text":"Exemple"},{"language":"Italian","symbol":"it","text":"Esempio"},{"language":"Czech","symbol":"cs","text":"Příklad"},{"language":"Spanish","symbol":"es","text":"Ejemplo"},{"language":"German","symbol":"de","text":"Beispiel"}]
2 changes: 1 addition & 1 deletion sphinx_proof/translations/jsons/Observation.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"language":"English","symbol":"en","text":"Observation"},{"language":"French","symbol":"fr","text":"Observation"},{"language":"Italian","symbol":"it","text":"Osservazione"},{"language":"Czech","symbol":"cs","text":"Pozorování"}]
[{"language":"English","symbol":"en","text":"Observation"},{"language":"French","symbol":"fr","text":"Observation"},{"language":"Italian","symbol":"it","text":"Osservazione"},{"language":"Czech","symbol":"cs","text":"Pozorování"},{"language":"Spanish","symbol":"es","text":"Observación"},{"language":"German","symbol":"de","text":"Beobachtung"}]
2 changes: 1 addition & 1 deletion sphinx_proof/translations/jsons/Property.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"language":"English","symbol":"en","text":"Property"},{"language":"French","symbol":"fr","text":"Propriété"},{"language":"Italian","symbol":"it","text":"Proprietà"},{"language":"Czech","symbol":"cs","text":"Vlastnost"}]
[{"language":"English","symbol":"en","text":"Property"},{"language":"French","symbol":"fr","text":"Propriété"},{"language":"Italian","symbol":"it","text":"Proprietà"},{"language":"Czech","symbol":"cs","text":"Vlastnost"},{"language":"Spanish","symbol":"es","text":"Propiedad"},{"language":"German","symbol":"de","text":"Eigenschaft"}]
2 changes: 1 addition & 1 deletion sphinx_proof/translations/jsons/Proposition.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"language":"English","symbol":"en","text":"Proposition"},{"language":"French","symbol":"fr","text":"Proposition"},{"language":"Italian","symbol":"it","text":"Proposizione"}]
[{"language":"English","symbol":"en","text":"Proposition"},{"language":"French","symbol":"fr","text":"Proposition"},{"language":"Italian","symbol":"it","text":"Proposizione"},{"language":"Spanish","symbol":"es","text":"Proposición"},{"language":"German","symbol":"de","text":"Proposition"}]
3 changes: 1 addition & 2 deletions sphinx_proof/translations/jsons/Remark.json
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
[{"language":"English","symbol":"en","text":"Remark"},{"language":"Arabic","symbol":"ar","text":"ملاحظة"},{"language":"Dutch","symbol":"nl","text":"Opmerking"},{"language":"French","symbol":"fr","text":"Remarque"},{"language":"German","symbol":"de","text":"Anmerkung"},{"language":"Italian","symbol":"it","text":"osservazione"},{"language":"Japanese","symbol":"ja","text":"述べる"},{"language":"Russian","symbol":"ru","text":"Замечание"},{"language":"Spanish","symbol":"es","text":"Observación"},
{"language":"Czech","symbol":"cs","text":"Poznámka"}]
[{"language":"English","symbol":"en","text":"Remark"},{"language":"Arabic","symbol":"ar","text":"ملاحظة"},{"language":"Dutch","symbol":"nl","text":"Opmerking"},{"language":"French","symbol":"fr","text":"Remarque"},{"language":"German","symbol":"de","text":"Bemerkung"},{"language":"Italian","symbol":"it","text":"osservazione"},{"language":"Japanese","symbol":"ja","text":"述べる"},{"language":"Russian","symbol":"ru","text":"Замечание"},{"language":"Spanish","symbol":"es","text":"Nota"},{"language":"Czech","symbol":"cs","text":"Poznámka"}]
2 changes: 1 addition & 1 deletion sphinx_proof/translations/jsons/Theorem.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"language":"English","symbol":"en","text":"Theorem"},{"language":"Arabic","symbol":"ar","text":"نظرية"},{"language":"Dutch","symbol":"nl","text":"Stelling"},{"language":"French","symbol":"fr","text":"Théorème"},{"language":"German","symbol":"de","text":"Satz"},{"language":"Italian","symbol":"it","text":"Teorema"},{"language":"Japanese","symbol":"ja","text":"定理"},{"language":"Russian","symbol":"ru","text":"Теорема"},{"language":"Spanish","symbol":"es","text":"Věta"}]
[{"language":"English","symbol":"en","text":"Theorem"},{"language":"Arabic","symbol":"ar","text":"نظرية"},{"language":"Dutch","symbol":"nl","text":"Stelling"},{"language":"French","symbol":"fr","text":"Théorème"},{"language":"German","symbol":"de","text":"Satz"},{"language":"Italian","symbol":"it","text":"Teorema"},{"language":"Japanese","symbol":"ja","text":"定理"},{"language":"Russian","symbol":"ru","text":"Теорема"},{"language":"Spanish","symbol":"es","text":"Teorema"}]
Binary file modified sphinx_proof/translations/locales/de/LC_MESSAGES/proof.mo
Binary file not shown.
Binary file modified sphinx_proof/translations/locales/es/LC_MESSAGES/proof.mo
Binary file not shown.