mirror of https://github.com/logseq/logseq
Also add more explicit translation guidance for reviewerspull/9813/head
parent
64cf564183
commit
25c8cfc6ab
|
@ -74,11 +74,24 @@ error if it detects an invalid query.
|
|||
|
||||
### Translations
|
||||
|
||||
Our translations can be configured incorrectly. We can catch some of these
|
||||
mistakes [as noted here](./contributing-to-translations.md#fix-mistakes).
|
||||
We use [tongue](https://github.com/tonsky/tongue), a simple and effective
|
||||
library, for translations. We have a couple bb tasks for working with
|
||||
translations under `lang:` e.g. `bb lang:list`. See [the translator
|
||||
guide](./contributing-to-translations.md) for usage.
|
||||
|
||||
Punctuation and delimiting characters (e.g. `:`, `:`, `?`) should be part of the translatable string.
|
||||
Those characters and their position may vary depending on the language.
|
||||
One useful task for reviewers (us) and contributors alike, is `bb
|
||||
lang:validate-translations` which catches [common
|
||||
mistakes](./contributing-to-translations.md#fix-mistakes)). When reviewing
|
||||
translations here are some things to keep in mind:
|
||||
|
||||
* Punctuation and delimiting characters (e.g. `:`, `:`, `?`) should be part of
|
||||
the translatable string. Those characters and their position may vary depending on the language.
|
||||
* Translations usually return strings but they can return hiccup vectors with a
|
||||
fn translation. Hiccup vectors are needed when word order matters for a
|
||||
translation and formatting is involved. See [this 3 word Turkish
|
||||
example](https://github.com/logseq/logseq/commit/1d932f07c4a0aad44606da6df03a432fe8421480#r118971415).
|
||||
* Translations can have arguments for interpolating strings. When they do, be
|
||||
sure translators are using them correctly.
|
||||
|
||||
### Spell Checker
|
||||
|
||||
|
|
|
@ -84,8 +84,10 @@
|
|||
[route-match]
|
||||
(let [name (get-in route-match [:parameters :path :tool])]
|
||||
[:div.flex.flex-col ;; container
|
||||
[:h1.text-2xl.mx-auto.mb-4 (ui/icon "clipboard") " " (-> (t :bug-report/clipboard-inspector-title) (string/capitalize))]
|
||||
(cond ;; TODO any fallback?
|
||||
(cond
|
||||
(= name "clipboard-data-inspector")
|
||||
[:h1.text-2xl.mx-auto.mb-4 (ui/icon "clipboard") " " (-> (t :bug-report/clipboard-inspector-title) (string/capitalize))])
|
||||
(cond
|
||||
(= name "clipboard-data-inspector")
|
||||
(clipboard-data-inspector))]))
|
||||
|
||||
|
|
|
@ -271,8 +271,9 @@
|
|||
(not (mobile-util/native-platform?)))
|
||||
(fn [close-fn]
|
||||
[:div
|
||||
;; TODO: fn translation with args
|
||||
[:p
|
||||
(t :settings-permission/grant-permission)
|
||||
"Grant native filesystem permission for directory: "
|
||||
[:b (config/get-local-dir repo)]]
|
||||
(ui/button
|
||||
(t :settings-permission/start-granting)
|
||||
|
|
|
@ -340,7 +340,6 @@
|
|||
:settings-page/update-available "Found new release "
|
||||
:settings-page/update-error-1 "⚠️ Oops, Something Went Wrong!"
|
||||
:settings-page/update-error-2 " Please check out the "
|
||||
:settings-permission/grant-permission "Grant native filesystem permission for directory: "
|
||||
:settings-permission/start-granting "Grant"
|
||||
|
||||
:yes "Yes"
|
||||
|
|
|
@ -246,7 +246,6 @@
|
|||
:settings-page/custom-global-configuration "自定义全局配置"
|
||||
:settings-page/edit-global-config-edn "编辑全局 config.edn"
|
||||
:settings-page/sync "同步"
|
||||
:settings-permission/grant-permission "授权访问本地目录: "
|
||||
:settings-permission/start-granting "开始授权"
|
||||
:yes "是"
|
||||
:submit "提交"
|
||||
|
|
Loading…
Reference in New Issue