website-v2 icon indicating copy to clipboard operation
website-v2 copied to clipboard

Markdown strings shouldn't use their position in the file as keys

Open mxmou opened this issue 4 years ago • 7 comments
trafficstars

It means most of the file needs to be translated again after a change.

mxmou avatar Jul 14 '21 18:07 mxmou

Yeah, I agree. I believe the website should use string keys, like the extension does.

WorldLanguages avatar Jul 17 '21 17:07 WorldLanguages

Just enable TX identical string detection smh

I assume there isn't any way of changing the keys inside of MD. the TX setting will see if a key has already been translated before and if it has, users the past translation.


From: World_Languages @.> Sent: Saturday, July 17, 2021 12:47:06 PM To: ScratchAddons/website-v2 @.> Cc: Subscribed @.***> Subject: Re: [ScratchAddons/website-v2] Markdown strings shouldn't use their position in the file as keys (#89)

Yeah, I agree. I believe the website should use string keys, like the extension does.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/ScratchAddons/website-v2/issues/89#issuecomment-881934024, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AOT5DESIBSWP223E5IPSQIDTYG6ZVANCNFSM5AL7FNTQ.

cobaltt7 avatar Jul 17 '21 19:07 cobaltt7

lol maybe skip my comment i didn't read this is about markdown but i've seen transifex using the string as the key for non-markdown, and i don't think that's very good?

WorldLanguages avatar Jul 17 '21 20:07 WorldLanguages

but i've seen transifex using the string as the key for non-markdown, and i don't think that's very good?

It's much better than using line numbers. Markdown keys were like that too until recently.

mxmou avatar Jul 18 '21 07:07 mxmou

I should have write this a while ago and I forgot, so here it goes now.

This is a Transifex problem on Markdown, and it's really weird that Transifex does that instead of your ordinary hashing or using the string directly. This is a limitation that I didn't expect.

Unless we move providers to something like Crowdin, maybe I should start thinking about doing a YAML/JSON dictionary instead. It builds a hash key from the all the valid strings, and similar strings would have the same key (This may be stupid). It may be worth it in the long run, or not, but I need to consider.

Hans5958 avatar Jul 25 '21 15:07 Hans5958

Forgot to comment it here, but I've since used TM Fillup so you don't need to rewrite exact texts that have been translated. I've tested it on FAQ, which I added admotions, which means the positions are changing, and no translation is thrown.

Hans5958 avatar Mar 10 '22 07:03 Hans5958

@Hans5958 That mitigated this issue, good enough I guess

WorldLanguages avatar Mar 11 '22 22:03 WorldLanguages