Add project translations for meta data keywords (#1586)

This commit is contained in:
Veronica Berglyd Olsen
2023-11-09 17:35:28 +01:00
committed by GitHub
8 changed files with 57 additions and 7 deletions
@@ -2,6 +2,16 @@
"Synopsis": "Synopsis",
"Comment": "Kommentar",
"Notes": "Notizen",
"Tag": "Schlagwort",
"Point of View": "Perspektive",
"Focus": "Mittelpunkt",
"Characters": "Charaktere",
"Plot": "Handlungen",
"Timeline": "Zeitleiste",
"Locations": "Schauplätze",
"Objects": "Objekte",
"Entities": "Organisationen",
"Custom": "Benutzerdefiniert",
"0": "Null",
"1": "Eins",
"2": "Zwei",
@@ -2,6 +2,16 @@
"Synopsis": "Synopsis",
"Comment": "Comment",
"Notes": "Notes",
"Tag": "Tag",
"Point of View": "Point of View",
"Focus": "Focus",
"Characters": "Characters",
"Plot": "Plot",
"Timeline": "Timeline",
"Locations": "Locations",
"Objects": "Objects",
"Entities": "Entities",
"Custom": "Custom",
"0": "Zero",
"1": "One",
"2": "Two",
@@ -2,6 +2,16 @@
"Synopsis": "Synopsis",
"Comment": "Comment",
"Notes": "Notes",
"Tag": "Tag",
"Point of View": "Point of View",
"Focus": "Focus",
"Characters": "Characters",
"Plot": "Plot",
"Timeline": "Timeline",
"Locations": "Locations",
"Objects": "Objects",
"Entities": "Entities",
"Custom": "Custom",
"0": "Zero",
"1": "One",
"2": "Two",
+11 -1
View File
@@ -1,7 +1,17 @@
{
"Synopsis": "あらすじ",
"Comment": "コメント ",
"Comment": "コメント",
"Notes": "ノート",
"Tag": "タグ",
"Point of View": "視点",
"Focus": "焦点",
"Characters": "キャラクター",
"Plot": "プロット",
"Timeline": "タイムライン",
"Locations": "場所",
"Objects": "オブジェクト",
"Entities": "エンティティ",
"Custom": "カスタム",
"0": "零",
"1": "一",
"2": "二",
@@ -2,6 +2,16 @@
"Synopsis": "Sammendrag",
"Comment": "Kommentar",
"Notes": "Notat",
"Tag": "Knagg",
"Point of View": "Perspektiv",
"Focus": "Fokus",
"Characters": "Karakterer",
"Plot": "Plott",
"Timeline": "Tidslinje",
"Locations": "Lokasjoner",
"Objects": "Objekter",
"Entities": "Enheter",
"Custom": "Annet",
"0": "null",
"1": "én",
"2": "to",
+2 -2
View File
@@ -31,7 +31,7 @@ from pathlib import Path
from novelwriter import CONFIG
from novelwriter.common import formatTimeStamp
from novelwriter.constants import nwHeadFmt, nwKeyWords, nwLabels, nwHtmlUnicode, trConst
from novelwriter.constants import nwHeadFmt, nwKeyWords, nwLabels, nwHtmlUnicode
from novelwriter.core.project import NWProject
from novelwriter.core.tokenizer import Tokenizer, stripEscape
@@ -477,7 +477,7 @@ class ToHtml(Tokenizer):
if not valid or not bits or bits[0] not in nwLabels.KEY_NAME:
return ""
result = f"<span class='tags'>{trConst(nwLabels.KEY_NAME[bits[0]])}:</span> "
result = f"<span class='tags'>{self._localLookup(nwLabels.KEY_NAME[bits[0]])}:</span> "
if len(bits) > 1:
if bits[0] == nwKeyWords.TAG_KEY:
result += f"<a name='tag_{bits[1]}'>{bits[1]}</a>"
+2 -2
View File
@@ -27,7 +27,7 @@ import logging
from pathlib import Path
from novelwriter.constants import nwHeadFmt, nwLabels, trConst
from novelwriter.constants import nwHeadFmt, nwLabels
from novelwriter.core.project import NWProject
from novelwriter.core.tokenizer import Tokenizer
@@ -209,7 +209,7 @@ class ToMarkdown(Tokenizer):
result = ""
if bits[0] in nwLabels.KEY_NAME:
result += f"**{trConst(nwLabels.KEY_NAME[bits[0]])}:** "
result += f"**{self._localLookup(nwLabels.KEY_NAME[bits[0]])}:** "
if len(bits) > 1:
result += ", ".join(bits[1:])
+2 -2
View File
@@ -37,7 +37,7 @@ from datetime import datetime
from novelwriter import __version__
from novelwriter.common import xmlIndent
from novelwriter.constants import nwHeadFmt, nwKeyWords, nwLabels, trConst
from novelwriter.constants import nwHeadFmt, nwKeyWords, nwLabels
from novelwriter.core.project import NWProject
from novelwriter.core.tokenizer import Tokenizer, stripEscape
@@ -572,7 +572,7 @@ class ToOdt(Tokenizer):
if not valid or not bits or bits[0] not in nwLabels.KEY_NAME:
return "", []
rTxt = f"{trConst(nwLabels.KEY_NAME[bits[0]])}: "
rTxt = f"{self._localLookup(nwLabels.KEY_NAME[bits[0]])}: "
rFmt = [(0, self.FMT_B_B), (len(rTxt) - 1, self.FMT_B_E)]
if len(bits) > 1:
if bits[0] == nwKeyWords.TAG_KEY: