9001 / copyparty

Portable file server with accelerated resumable uploads, dedup, WebDAV, FTP, TFTP, zeroconf, media indexer, thumbnails++ all in one file, no deps
MIT License
854 stars 49 forks source link

Translate it to French #102

Open hugo-akaora opened 1 month ago

hugo-akaora commented 1 month ago

Hello,

I would be happy to work on a copyparty's French translation, as it's my mother language and translating is a hobby!

Would you guide me on how to do it ?

In the doc I found:

if editing browser.js is inconvenient in your setup then you can instead do this: add your translation to a separate javascript file (tl.js) and make it load before browser.js with the help of --html-head='' s the page loads, browser.js will look for a function named langmod so define that function and make it insert your translation into the Ls and LANGS variables so it'll take effect

I'm a python newbie (I'm actually trying to learn it!), so I don't know how to do it.

I mainly use the docker image, so if you have tips on how to do it using that way. If it's not easy, I'll use copyparty-sfx.py.

Thank you! J'ai hâte que copyparty soit disponible en français ! I'm looking forward copyparty available in French!

9001 commented 1 month ago

awesome! Looking forward to having French as an option, thank you for picking this up :grin: :+1:

Looking back at the translation notes, I realize the part regarding docker-like environments was, welll... extremely terse. Sorry about that! I tried to make it a bit more approachable, let's see if this is any better -- https://github.com/9001/copyparty/tree/hovudstraum/docs/rice#translations-docker-friendly

Like the docs already mentioned, there's some really funky syntax in there... sometimes $N is used for linebreaks, and other lines use \n instead, etc... Just be on the lookout and try to use the same formatting that the original lines used. And please don't be afraid to ask if anything's unclear of course :>

EDIT: for the actual translation steps, you'll be looking at a "key": "value" list, where the keys should be left as-is, and the value is the one that should be localized. However, like mentioned, in copyparty the values may also contain html code... so just step around those hehe

there's also a tiny exception to this rule -- there is the "hks": [ section, which is the hotkeys list you get by pressing the ? hotkey -- this section doesn't follow the key:value format, but instead you can translate everything in there.

hugo-akaora commented 1 month ago

Hello, Looks good to me! I'll try it next week. Thank you :)

hugo-akaora commented 1 month ago

LGTM :-D

image

I'll translate it when i need to chill, it's not exhausting!