rejetto forum

Software => HFS ~ HTTP File Server => Beta => Topic started by: rejetto on May 31, 2020, 01:29:54 PM

Title: 2.4 translation
Post by: rejetto on May 31, 2020, 01:29:54 PM
here we'll share knowledge on the translation process.
I'm still not sure how to do things. Let's see together.
I'll use this first topic to recap results.

You must be sure to use the most updated version for LNG and EXE files.
https://github.com/rejetto/hfs2/releases/tag/v2.4-rc02

I don't know if the translations for 2.3 can be updated for 2.4, but possibly here is described a procedure
https://sites.google.com/site/kryvich/localizer/howto?authuser=0 (https://sites.google.com/site/kryvich/localizer/howto?authuser=0)
for your convenience i've attached the lngupdate tool.
Title: Re: 2.4 translation
Post by: rejetto on June 02, 2020, 12:22:59 PM
this version should be good enough for translation
Title: Re: 2.4 translation
Post by: NaitLee on June 04, 2020, 04:37:14 PM
Is this .lng file (http://rejetto.com/forum/index.php?topic=13060.msg1065833#msg1065833) already outdated?    (Without doubt, it's yes...)
I cannot access rejetto's link to hfs.lng, so I translated the file in the 2.4 topic.
But those newly added resource strings are not read correctly by HFS beta9, with dog-tail-on-a-cat problems and endless error popups like this (http://rejetto.com/forum/index.php?topic=13060.msg1065863#msg1065863).

Above are not big deals. Just try to offer a new version of hfs.lng with a valid link.
I've already translated new strings to Chinese in a spread sheet, convenient for management.
They need to be tested though. Now everything to do is to replace them to new .lng file, make HFS can run correctly with them :D
Title: Re: 2.4 translation
Post by: Mars on June 04, 2020, 04:47:15 PM
Quote
I cannot access rejetto's link to hfs.lng,
https://raw.githubusercontent.com/rejetto/hfs2/v2.4-beta09/hfs.lng
attached file from the link
Title: Re: 2.4 translation
Post by: rejetto on June 04, 2020, 06:24:32 PM
I cannot access rejetto's link to hfs.lng, so I translated the file in the 2.4 topic.

let me understand, you can download the exe but not the lng in the links i gave you?
if yes, i will see to upload the lng in the same place of the exe. LMK
Title: Re: 2.4 translation
Post by: NaitLee on June 05, 2020, 02:25:07 AM
let me understand, you can download the exe but not the lng in the links i gave you?

Yes, GitHub is no problem, but the raw- site "error connection refused".
Title: Re: 2.4 translation
Post by: rejetto on June 05, 2020, 08:48:17 AM
ok, i replaced the link in the first post
Title: Re: 2.4 translation
Post by: NaitLee on June 05, 2020, 11:24:14 AM
Strings before [ResourceStrings] in 2.3m .lng file can be instandly moved to 2.4 one. They are compatible.

In the new file, there are 2 strings with the same ID 64766:

Code: [Select]
560 |  64766_main_MSG_MAX_SIM_DL_SING{1}=Max simultaneous downloads from a single IP address.
...
708 |  64766_main_MSG_MAX_SIM_DL_SING{2}=Max simultaneous downloads from single address

Seems it's them making the "Max simultaneous downloads from single address" unable to be translated.

There are still a few strings cannot be translated.
  Hovertip of the connection list
  Logboard -> addresses ever connected -> Totals
  The "about" message in menu
  Dialog for changing port
  The lower bar of HFS: Virtual File System: 1 item(s) - not saved
  (maybe more)

The almost-completed Chinese translation file for beta10 is attached for tests.
Title: Re: 2.4 translation
Post by: rejetto on June 08, 2020, 04:14:02 PM
i forgot to say that i took care of this problem, and it should be no more.
I also decided to change a couple of names, to have a standard naming, sorry for it.
From now i will publish a new hfs.lng on github together with the exe, but only when there are changes. It will not be as frequent as now, hopefully.
Title: Re: 2.4 translation
Post by: NaitLee on June 08, 2020, 04:27:27 PM
I also decided to change a couple of names, to have a standard naming, sorry for it.

Nothing, I made a spreadsheet with macros, helping me to just replace already-translated strings to new ID & names.
Translation is never easier than this ;)

How about me to publish that sheet out once I finished it?
Title: Re: 2.4 translation
Post by: rejetto on June 08, 2020, 04:30:56 PM
sure, if it's a useful tool for others why not share it
Title: Re: 2.4 translation
Post by: dj on July 09, 2020, 02:11:33 PM
Download (https://dj0001.github.io/hfs-template/addons/languages/en.html?https://raw.githubusercontent.com/rejetto/hfs2/master/default.tpl) empty en language file for the default template

P.S: Line 63 (https://github.com/rejetto/hfs2/blob/master/default.tpl#L63) should be fixed in the template
Title: Re: 2.4 translation
Post by: NaitLee on July 09, 2020, 03:46:12 PM
P.S: Line 63 (https://github.com/rejetto/hfs2/blob/master/default.tpl#L63) should be fixed in the template

Seems the {.?search.} is just for getting a urlvar (https://rejetto.com/wiki/index.php?title=HFS:_scripting_commands#Shortcuts), no need to be corrected. :D

The download button goes with some error here, but I found the blob link and got the file.
Just put the lines here:    (deleted "{.if|{.length|{.?search=" and "%reason%", and configurations such as "options.move=1", added "Clear")
Code: [Select]
HFS=
Uptime=
Account panel=
Login=
Search=
Enable multi-selection=
Selection=
New folder=
Display timestamps=
Toggle timestamp=
Download selected files as a single archive=
Download these files as a single archive?=
Archive=
Upload=
Change list order=
selected=
Mask=
Invert=
Delete=
Move=
title=
folders=
files=
Uploaded=
Failed=
Queued=
Uploading...=
Reload page=
this folder and sub-folders=
this folder only=
entire server=
Go=
Download counter:=
NEW=
More options=
item folder=
Login required=
Not found=
go to root=
Server Too Busy=
The server is too busy to handle your request at this time. Retry later=
Download limit=
max s dl msg=
Unauthorized=
Either your user name and password do not match, or you are not permitted to access this resource.=
Forbidden=
This resource is not accessible.=
You are banned=
uploaded by=
No file exchange in progress.=
Uploading=
Time left=
Downloading=
User=
created folder=
Anonymous=
renamed=
to=
Moving items to=
not found=
already exists=
not moved=
Bytes=
Sorry, you lack permissions for this action=
Warning: the password will be sent unencrypted to the server. For better security change the password from HFS window.=
Enter new password=
Password changed=
Ok=
Error=
confirm=
Enter the destination folder=
We met the following problems:=
files were moved.=
No file was moved.=
Please enter the file mask to select=
Username=
Password=
Change password=
Logout=
Sort by=
Size=
Speed=
Name=
Extension=
Timestamp=
Hits=
Default=
Rename=
Comment=
No access=
Sort=
Clear=

The "Clear" in search box needs to be wrapped by {.!  .}
Title: Re: 2.4 translation
Post by: dj on July 09, 2020, 04:28:40 PM
The download button goes with some error here, but I found the blob link and got the file.

Now it should work also with your language
https://dj0001.github.io/hfs-template/addons/languages/en.html?https%3A%2F%2Fraw.githubusercontent.com%2Frejetto%2Fhfs2%2Fmaster%2Fdefault.tpl

Line 63 should be changed to
Code: [Select]
<div id='nothing'>{.if|{.length|{.?search.}.}|{:{.!No results.}:}|{:{.!No files.}:}.}</div>
P.S.: works also with your template

https://dj0001.github.io/hfs-template/addons/languages/en.html?https://raw.githubusercontent.com/NaitLee/Takeback-HFS-Template/master/takeback.stuffs/takeback_0.15b.standard.tpl
or
https://dj0001.github.io/hfs-template/addons/languages/en.html?https%3A%2F%2Fraw.githubusercontent.com%2FNaitLee%2FTakeback-HFS-Template%2Fmaster%2Ftakeback.stuffs%2Ftakeback_0.15b.standard.tpl

Update: removed special:strings (such as "option.move")

Title: Re: 2.4 translation
Post by: NaitLee on July 09, 2020, 04:37:11 PM
https://dj0001.github.io/hfs-template/addons/languages/en.html?https%3A%2F%2Fraw.githubusercontent.com%2Frejetto%2Fhfs2%2Fmaster%2Fdefault.tpl

...

P.S.: works also with your template

https://dj0001.github.io/hfs-template/addons/languages/en.html?https://raw.githubusercontent.com/NaitLee/Takeback-HFS-Template/master/takeback.stuffs/takeback_0.15b.standard.tpl
or
https://dj0001.github.io/hfs-template/addons/languages/en.html?https%3A%2F%2Fraw.githubusercontent.com%2FNaitLee%2FTakeback-HFS-Template%2Fmaster%2Ftakeback.stuffs%2Ftakeback_0.15b.standard.tpl

Just figured out how your "Download" works, fantastic job ;)
Title: Re: 2.4 translation
Post by: Richard_F on July 11, 2020, 11:07:36 AM
ok, i replaced the link in the first post

thanks for that , it opens for me
Title: Re: 2.4 translation
Post by: dj on July 12, 2020, 06:08:01 AM
Download (https://dj0001.github.io/hfs-template/addons/languages/en_V2.html?https%3A%2F%2Fraw.githubusercontent.com%2Frejetto%2Fhfs2%2Fmaster%2Fdefault.tpl) (empty en) language file for the default template

V2 prefills the file with an existing* language file
*only a handful at the moment (translations are welcome)
Title: Re: 2.4 translation
Post by: NaitLee on July 12, 2020, 04:30:57 PM
V2 prefills the file with an existing* language file
*only a handful at the moment

I see zh only has some from mine for mobil-light/takeback. But actually here (http://rejetto.com/forum/index.php?topic=13290.0) have a full translation for zh (currently 2.3m default, but enough). Download it as this (http://rejetto.com/forum/index.php?action=dlattach;topic=13290.0;attach=9936).

The import from takeback zh to 2.4 original has a bug. The last word the same, then the whole word the same.
eg: Choose some files=选择一些文件 => files=选择一些文件 ; Click to Archive=点击打包下载 => Archive=点击打包下载
Title: Re: 2.4 translation
Post by: dj on July 12, 2020, 06:26:02 PM
I removed The import from takeback and used the file from 2.3m default
and added Logout, Username, Password (from Takeback).
So almost all is translated. :)
Title: Re: 2.4 translation
Post by: NaitLee on July 13, 2020, 03:04:07 AM
I'm working & testing on a new translation file for 2.4 def for zh. We're going to have a full translation soon  ;)
Some mis-translated strings will be corrected.

Problems found in default tpl:
  some built-in strings (like title=HTTP File Server, no results=No items match your search query)
  are not translatable with [+special:strings] due to they already inside the tpl.
  remove the plus can work, but some customize settings (option.move=1 etc.) are influenced.
Title: Re: 2.4 translation
Post by: LeoNeeson on July 18, 2020, 06:46:10 AM
Problems found in default tpl:
I think Rejetto will fix it as soon he sees your message, but if he forgets, remind him again, since (from my experience) sometimes he unintentionally overlooks some messages (for having little time available to read every post here).
Cheers,
Leo.-
Title: Re: 2.4 translation
Post by: rejetto on July 27, 2020, 10:13:26 PM
I could just remove that specific [+special:strings]  but it's there for a reason, and it's to make source text more "stable", so that translations need less updates.
I should use it even more, actually.
But that problem is compromising the very sense of that feature, impeding people to make translations :D
One possible solution is to have an alternative to the + operator to prepend instead of to append. As symbol I would use ^ .
Prepending would give priority to the customization.
This should be quick and easy to make for me, and technically good.