1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2024-12-15 23:28:20 +09:00
cherrypick/locales
Johann150 804fa33535
refactor: improve code quality (#8751)
* remove unnecessary if

`Array.prototype.some` already returns a boolean so an if to return
true or false is completely unnecessary in this case.

* perf: use count instead of find

When using `count` instead of `findOneBy`, the data is not
unnecessarily loaded.

* remove duplicate null check

The variable is checked for null in the lines above and the function
returns if so. Therefore, it can not be null at this point.

* simplify `getJsonSchema`

Because the assigned value is `null` and the used keys are only
shallow, use of `nestedProperty.set` seems inappropriate. Because the
value is not read, the initial for loop can be replaced by a `for..in`
loop.

Since all keys will be assigned `null`, the condition of the ternary
expression in the nested function will always be true. Therefore the
recursion case will never happen. With this the nested function can be
eliminated.

* remove duplicate condition

The code above already checks `dragging` and returns if it is truthy.
Checking it again later is therefore unnecessary.

To make this more obvious the `return` is removed in favour of using
an if...else construct.

* remove impossible "unknown" time

The `ago` variable will always be a number and all non-negative numbers
are already covered by other cases, the negative case is handled with
`future` so there is no case when `unkown` could be achieved.
2022-05-29 15:15:52 +09:00
..
ar-SA.yml New Crowdin updates (#8488) 2022-05-13 10:14:52 +09:00
bn-BD.yml New Crowdin updates (#8488) 2022-05-13 10:14:52 +09:00
ca-ES.yml New Crowdin updates (#8488) 2022-05-13 10:14:52 +09:00
cs-CZ.yml New Crowdin updates (#8488) 2022-05-13 10:14:52 +09:00
da-DK.yml New Crowdin updates (#6498) 2020-07-12 00:45:06 +09:00
de-DE.yml New Crowdin updates (#8488) 2022-05-13 10:14:52 +09:00
en-US.yml New Crowdin updates (#8488) 2022-05-13 10:14:52 +09:00
es-ES.yml New Crowdin updates (#8488) 2022-05-13 10:14:52 +09:00
fr-FR.yml New Crowdin updates (#8488) 2022-05-13 10:14:52 +09:00
hr-HR.yml New Crowdin updates (#8315) 2022-03-09 23:00:59 +09:00
ht-HT.yml New Crowdin updates (#7031) 2020-12-29 22:00:52 +09:00
id-ID.yml New Crowdin updates (#8488) 2022-05-13 10:14:52 +09:00
index.d.ts Fix #4152 (#4224) 2019-02-11 22:37:20 +09:00
index.js remove unused locale 2022-04-16 13:31:12 +09:00
it-IT.yml New Crowdin updates (#8488) 2022-05-13 10:14:52 +09:00
ja-JP.yml refactor: improve code quality (#8751) 2022-05-29 15:15:52 +09:00
ja-KS.yml New Crowdin updates (#8488) 2022-05-13 10:14:52 +09:00
jbo-EN.yml New Crowdin updates (#7567) 2021-07-20 12:09:39 +09:00
kab-KAB.yml New Crowdin updates (#8488) 2022-05-13 10:14:52 +09:00
kn-IN.yml New Crowdin updates (#8488) 2022-05-13 10:14:52 +09:00
ko-KR.yml New Crowdin updates (#8488) 2022-05-13 10:14:52 +09:00
nl-NL.yml New Crowdin updates (#8488) 2022-05-13 10:14:52 +09:00
no-NO.yml New Crowdin updates (#6498) 2020-07-12 00:45:06 +09:00
pl-PL.yml New Crowdin updates (#8488) 2022-05-13 10:14:52 +09:00
pt-PT.yml New Crowdin updates (#8488) 2022-05-13 10:14:52 +09:00
README.md syuilo/misskey --> misskey-dev/misskey 2021-03-24 12:23:05 +09:00
ro-RO.yml New Crowdin updates (#8488) 2022-05-13 10:14:52 +09:00
ru-RU.yml New Crowdin updates (#8488) 2022-05-13 10:14:52 +09:00
si-LK.yml New Crowdin updates (#8315) 2022-03-09 23:00:59 +09:00
sk-SK.yml New Crowdin updates (#8488) 2022-05-13 10:14:52 +09:00
th-TH.yml New Crowdin updates (#7036) 2020-12-31 19:45:30 +09:00
tr-TR.yml New Crowdin updates (#8398) 2022-03-12 19:34:43 +09:00
ug-CN.yml New Crowdin updates (#8398) 2022-03-12 19:34:43 +09:00
uk-UA.yml New Crowdin updates (#8488) 2022-05-13 10:14:52 +09:00
vi-VN.yml New Crowdin updates (#8488) 2022-05-13 10:14:52 +09:00
zh-CN.yml New Crowdin updates (#8488) 2022-05-13 10:14:52 +09:00
zh-TW.yml New Crowdin updates (#8488) 2022-05-13 10:14:52 +09:00

DO NOT edit locale files except ja-JP.yml.

When you add text to the ja-JP file (of misskey-dev/misskey), it will automatically be applied to other language files. Translations added in ja-JP file should contain the original Japanese strings.

Please see Contribution guide for more information.