|
Show me
|
||
![]() ![]() |
Sep 19 2006, 07:10
Post
#1
|
|
![]() Advanced Member ![]() Group: Super Mod Posts: 8.357 Joined: 30-July 05 From: GoofyLand Member No.: 13 ![]() Extension Developer: Yes Extensions: BabelZillaMenu-BabelZilla Glossary-OpenTran... Translator for French (fr) My OS Gnu/Linux Translation Credits to Goofy |
I also began a babelwiki page which is uncomplete and needing screenshots among others. [color=#FF0000]* trim the length of the created entities to a customized number of characters. In the current version there is manual work to limit the length to something reasonable. So the entitizing process itself is very quick and spares much time, but you have to check every file afterwards for empty strings and too long entity names. * add the extension name (or first chars of it) at the beginning of entity names (as it is common use for most of manually created entities) * detect empty strings from the xul files and avoid creating empty useless entities * make the .txt files editable and customizable throughout the extension interface * fix a kind of mess that may happen when creating the doctype line in case there already is one (a "public" one, referring to FF chrome itself) * add an extra dialog popping when a file is processed, telling "Strings from this file are now successfully entitized, do you want to process another file ? (Y/N)" . When there are numerous files to "externalize", user has to restart the main dialog for each file, it would be quicker to leave the main dialog (file selector) open as long as there are files to process -------------------- Think Global, Make Locales!
![]() You like languages? You should contribute to Tatoeba project! ![]() Sometimes I am on irc://moznet/BabelZilla but you can also drop a word in the shoutbox |
|
|
|
Sep 19 2006, 08:07
Post
#2
|
|
![]() WTS Developer ![]() ![]() ![]() Group: WTS Developer Posts: 498 Joined: 7-August 05 From: Palermo (Italy) Member No.: 79 ![]() Extension Developer: Yes Extensions: Some bonsai extensions Translator for [No translator] |
QUOTE(Goofy @ Sep 19 2006, 08:10) [snapback]19046[/snapback] I put here some kind of wishlist by order of priority (imho) : * trim the length of the created entities to a customized number of characters. In the current version there is manual work to limit the length to something reasonable. So the entitizing process itself is very quick and spares much time, but you have to check every file afterwards for empty strings and too long entity names. * add the extension name (or first chars of it) at the beginning of entity names (as it is common use for most of manually created entities) * detect empty strings from the xul files and avoid creating empty useless entities * make the .txt files editable and customizable throughout the extension interface * fix a kind of mess that may happen when creating the doctype line in case there already is one (a "public" one, referring to FF chrome itself) I also would add: - definition files can be downloaded from a well known repository (similar to an update system) - externalize starts from a given directory and its subdirectory getting all files (e.g. xml, js) - allow to extract from JS files (maybe need a new definition file) (adding stringbundle into xul file) any hint is welcommed -------------------- |
|
|
|
Sep 19 2006, 10:30
Post
#3
|
|
![]() Advanced Member ![]() Group: Super Mod Posts: 8.357 Joined: 30-July 05 From: GoofyLand Member No.: 13 ![]() Extension Developer: Yes Extensions: BabelZillaMenu-BabelZilla Glossary-OpenTran... Translator for French (fr) My OS Gnu/Linux Translation Credits to Goofy |
QUOTE definition files can be downloaded from a well known repository (similar to an update system) If you speak of the 3 .txt files with tags to detect I am not sure that linking an online source would be a good thing. I would prefer have them more user-customizable and "inside" the extension itself. From experience, i know the items of these files must be "adapted" sometimes according to every extension (and dev's fantasy I recently localized Grimholtz' big Passwordmaker extension, using my "usual" tag lists, then I realized there were tags I had never encountered before : "pickertooltiptext" - just my 2 eurocents -------------------- Think Global, Make Locales!
![]() You like languages? You should contribute to Tatoeba project! ![]() Sometimes I am on irc://moznet/BabelZilla but you can also drop a word in the shoutbox |
|
|
|
Sep 19 2006, 10:41
Post
#4
|
|
![]() WTS Developer ![]() ![]() ![]() Group: WTS Developer Posts: 498 Joined: 7-August 05 From: Palermo (Italy) Member No.: 79 ![]() Extension Developer: Yes Extensions: Some bonsai extensions Translator for [No translator] |
QUOTE(Goofy @ Sep 19 2006, 11:30) [snapback]19060[/snapback] If you speak of the 3 .txt files with tags to detect I am not sure that linking an online source would be a good thing. I would prefer have them more user-customizable and "inside" the extension itself. From experience, i know the items of these files must be "adapted" sometimes according to every extension (and dev's fantasy I recently localized Grimholtz' big Passwordmaker extension, using my "usual" tag lists, then I realized there were tags I had never encountered before : "pickertooltiptext" - just my 2 eurocents You are right but I think an official taglist can be more useful. At least (but not necessary in next release) we can combine an official list plus an user list (any duplcate can be safety removed by Externalize). -------------------- |
|
|
|
Sep 19 2006, 10:49
Post
#5
|
|
![]() Advanced Member ![]() Group: Super Mod Posts: 8.357 Joined: 30-July 05 From: GoofyLand Member No.: 13 ![]() Extension Developer: Yes Extensions: BabelZillaMenu-BabelZilla Glossary-OpenTran... Translator for French (fr) My OS Gnu/Linux Translation Credits to Goofy |
Yes you are wise, let's have an "official" list (or set of lists) to give an example or a default package, just as you did for me when you released the early version + the ability to edit files for the user.
-------------------- Think Global, Make Locales!
![]() You like languages? You should contribute to Tatoeba project! ![]() Sometimes I am on irc://moznet/BabelZilla but you can also drop a word in the shoutbox |
|
|
|
Sep 19 2006, 14:31
Post
#6
|
|
![]() eXtenZilla IT Member ![]() ![]() ![]() Group: Members Posts: 711 Joined: 30-July 05 From: Ferrara - Italia Member No.: 11 ![]() Extension Developer: No Translation Credits to Luca Pedrazzi - www.extenzilla.org |
QUOTE(Goofy @ Sep 19 2006, 08:10) [snapback]19046[/snapback] ...I also began a babelwiki page which is uncomplete and needing screenshots among others. I can do it for you... let me know what kind of image you need -------------------- |
|
|
|
Sep 19 2006, 18:27
Post
#7
|
|
![]() WTS Developer ![]() ![]() ![]() Group: WTS Developer Posts: 498 Joined: 7-August 05 From: Palermo (Italy) Member No.: 79 ![]() Extension Developer: Yes Extensions: Some bonsai extensions Translator for [No translator] |
QUOTE(Pedro @ Sep 19 2006, 15:31) [snapback]19063[/snapback] I can do it for you... let me know what kind of image you need Consider I would change UI... -------------------- |
|
|
|
Sep 19 2006, 19:12
Post
#8
|
|
![]() eXtenZilla IT Member ![]() ![]() ![]() Group: Members Posts: 711 Joined: 30-July 05 From: Ferrara - Italia Member No.: 11 ![]() Extension Developer: No Translation Credits to Luca Pedrazzi - www.extenzilla.org |
QUOTE(dafi @ Sep 19 2006, 19:27) [snapback]19072[/snapback] Consider I would change UI... I will wait the new UI... -------------------- |
|
|
|
Sep 23 2006, 11:40
Post
#9
|
|
![]() WTS Developer ![]() ![]() ![]() Group: WTS Developer Posts: 498 Joined: 7-August 05 From: Palermo (Italy) Member No.: 79 ![]() Extension Developer: Yes Extensions: Some bonsai extensions Translator for [No translator] |
Another brick in the wall.
Here you find the new patch. Bugs that should be fixed [x] trim the length of the created entities to a customized number of characters. The algorithm used is very brutal but works fine, any hint is welcommed [x] fix a kind of mess that may happen when creating the doctype line in case there already is one (a "public" one, referring to FF chrome itself) Now should work better [x] add the extension name (or first chars of it) at the beginning of entity names (as it is common use for most of manually created entities) Are really useful? [x] detect empty strings from the xul files and avoid creating empty useless entities No more entities generated when value is empty [x] add an extra dialog popping when a file is processed, telling "Strings from this file are now successfully entitized, do you want to process another file ? (Y/N)" . The dialog doesn't close, user must click on close button. I think is now more usable. [x] Redesigned UI Rationalized splitting in tabs [x] Print a simple report about entities processed -------------------- |
|
|
|
Sep 23 2006, 13:27
Post
#10
|
|
![]() Advanced Member ![]() Group: Super Mod Posts: 8.357 Joined: 30-July 05 From: GoofyLand Member No.: 13 ![]() Extension Developer: Yes Extensions: BabelZillaMenu-BabelZilla Glossary-OpenTran... Translator for French (fr) My OS Gnu/Linux Translation Credits to Goofy |
I have been performing a first series of tests and found everything working fine up to know. Especially QUOTE [x] trim the length of the created entities to a customized number of characters. The algorithm used is very brutal but works fine, any hint is welcommed Yes it works CODE <!ENTITY lkwd.toolbarbutton.add.curren1 "Add current tab to a wad in your collection. CTRL+UP ARROW"> <!ENTITY lkwd.toolbarbutton.open "Open "> <!ENTITY lkwd.toolbarbutton.open.a.wad2 "Open a wad from your collection. ALT+L"> <!ENTITY lkwd.toolbarbutton.save "Save "> <!ENTITY lkwd.toolbarbutton.add.this.w3 "Add this wad to your collection. CTRL+S"> <!ENTITY lkwd.toolbarbutton.clear "Clear "> <!ENTITY lkwd.toolbarbutton.close.all.4 "Close all tabs and return to home page. CTRL+ALT+Q"> <!ENTITY lkwd.toolbarbutton.options "Options "> <!ENTITY lkwd.menuitem.update.cache "Update Cache"> <!ENTITY lkwd.menuitem.update.your.cac5 "Update your cached account data when switching between computer systems."> <!ENTITY lkwd.menuitem.add.url "Add URL"> <!ENTITY lkwd.menuitem.add.current.tab6 "Add current tab to a wad in your collection. CTRL+UP ARROW"> <!ENTITY lkwd.menuitem.delete.wad "Delete Wad"> <!ENTITY lkwd.menuitem.remove.current.7 "Remove current wad from your collection. ALT+DEL"> <!ENTITY lkwd.menuitem.log.in "Log In"> <!ENTITY lkwd.menuitem.log.in.to.your.8 "Log in to your account."> <!ENTITY lkwd.menuitem.log.out "Log Out"> <!ENTITY lkwd.menuitem.log.out.of.your9 "Log out of your account."> <!ENTITY lkwd.menuitem.report.a.bug "Report a Bug"> <!ENTITY lkwd.menuitem.file.a.bug.rep10 "File a bug report via email."> <!ENTITY lkwd.menuitem.settings "Settings"> <!ENTITY lkwd.menuitem.set.account.in11 "Set account info and user preferences."> QUOTE [x] fix a kind of mess that may happen when creating the doctype line in case there already is one (a "public" one, referring to FF chrome itself) Now should work better yes it seems ok now, though I have not yet tested the relative function. It seems to add the 2nd locale address correctly. See output example : CODE <!DOCTYPE dialog SYSTEM 'chrome://browser/locale/bookmarks/addBookmark.dtd' [ <!ENTITY % bookmarkreviewerDTD SYSTEM "chrome://bookmarkreviewer/locale/addbmk.dtd" > %bookmarkreviewerDTD; ]> QUOTE [x] add the extension name (or first chars of it) at the beginning of entity names (as it is common use for most of manually created entities) Are really useful? Yes it works and it is useful when testing various extensions. When you test iand a parsing error occurs, you see generally the entity name where the prob is, but first thing to know is which extension is creating the problem. QUOTE [x] add an extra dialog popping when a file is processed, telling "Strings from this file are now successfully entitized, do you want to process another file ? (Y/N)" . The dialog doesn't close, user must click on close button. I think is now more usable. [x] Redesigned UI Rationalized splitting in tabs [x] Print a simple report about entities processed very good usability improvements , thanks again ! -------------------- Think Global, Make Locales!
![]() You like languages? You should contribute to Tatoeba project! ![]() Sometimes I am on irc://moznet/BabelZilla but you can also drop a word in the shoutbox |
|
|
|
Sep 23 2006, 13:34
Post
#11
|
|
![]() WTS Developer ![]() ![]() ![]() Group: WTS Developer Posts: 498 Joined: 7-August 05 From: Palermo (Italy) Member No.: 79 ![]() Extension Developer: Yes Extensions: Some bonsai extensions Translator for [No translator] |
QUOTE(Goofy @ Sep 23 2006, 14:27) [snapback]19166[/snapback] Yes it works To be sure to generate an unique name an incremental value is added, this solution is known as quick and dirty -------------------- |
|
|
|
Sep 23 2006, 13:49
Post
#12
|
|
![]() Advanced Member ![]() Group: Super Mod Posts: 8.357 Joined: 30-July 05 From: GoofyLand Member No.: 13 ![]() Extension Developer: Yes Extensions: BabelZillaMenu-BabelZilla Glossary-OpenTran... Translator for French (fr) My OS Gnu/Linux Translation Credits to Goofy |
QUOTE(dafi @ Sep 23 2006, 14:34) [snapback]19167[/snapback] To be sure to generate an unique name an incremental value is added, this solution is known as quick and dirty yes I like it : quick and in the present state of the extension, you should release it on addons.moz ! I am pretty sure many devs will like it and find it time-saving (for a number of them, localizing task is just boring or ignored) -------------------- Think Global, Make Locales!
![]() You like languages? You should contribute to Tatoeba project! ![]() Sometimes I am on irc://moznet/BabelZilla but you can also drop a word in the shoutbox |
|
|
|
Sep 28 2006, 22:54
Post
#13
|
|
![]() Advanced Member ![]() Group: Super Mod Posts: 8.357 Joined: 30-July 05 From: GoofyLand Member No.: 13 ![]() Extension Developer: Yes Extensions: BabelZillaMenu-BabelZilla Glossary-OpenTran... Translator for French (fr) My OS Gnu/Linux Translation Credits to Goofy |
you added this line in the wishlist QUOTE - allow to extract from JS files (maybe need a new definition file) (adding stringbundle into xul file) You know the stringbundle can be created on top of the .js itself, it will spare a step in the process. See my tiny howto : http://www.babelzilla.org/index.php?option...=15&Itemid= Thinking over this problem, if there are only alert ("messages") I suppose they will be easy to detect. But devs use various kinds of words to deal with messages to display (throw, dump,...) and most of the time, messages are viciously entangled with variables of all kinds... I suspect it will be quite difficult... Though probably "heavy" in terms of code, what with the idea of a "step by step" editing of items ? I mean : When the user starts the process to parse a js file, every time a new message to localize is detected, a window pops up with the original line of the .js, asking "Do you want to localize this line? (Yes/No/Cancel). Thus the user may see if the "message" is a real message to be displayed in the interface or some kind of code between quotation marks. -------------------- Think Global, Make Locales!
![]() You like languages? You should contribute to Tatoeba project! ![]() Sometimes I am on irc://moznet/BabelZilla but you can also drop a word in the shoutbox |
|
|
|
Sep 29 2006, 06:01
Post
#14
|
|
![]() WTS Developer ![]() ![]() ![]() Group: WTS Developer Posts: 498 Joined: 7-August 05 From: Palermo (Italy) Member No.: 79 ![]() Extension Developer: Yes Extensions: Some bonsai extensions Translator for [No translator] |
QUOTE(Goofy @ Sep 28 2006, 23:54) [snapback]19450[/snapback] you added this line in the wishlist You know the stringbundle can be created on top of the .js itself, it will spare a step in the process. See my tiny howto : http://www.babelzilla.org/index.php?option...=15&Itemid= Oh yes, I'm working on it but I've found some problem on parser so I delayed the release. QUOTE(Goofy @ Sep 28 2006, 23:54) [snapback]19450[/snapback] Thinking over this problem, if there are only alert ("messages") I suppose they will be easy to detect. But devs use various kinds of words to deal with messages to display (throw, dump,...) and most of the time, messages are viciously entangled with variables of all kinds... Another good shot Goofy Your solution is good, JS string extraction is a less automatic task. The steps should be: 1. detect every single and double quoted string (eg. 'Hello' or "Hello") 2. When all strings are found in file I show a summary dialog where you check which string externalize [ ] Hello found at line 3 [x] Quick brown fox found at line 5 With a row below showing original line (useful to understand where string has been found) 3. Externalize selected strings -------------------- |
|
|
|
Sep 29 2006, 06:33
Post
#15
|
|
![]() Advanced Member ![]() Group: Super Mod Posts: 8.357 Joined: 30-July 05 From: GoofyLand Member No.: 13 ![]() Extension Developer: Yes Extensions: BabelZillaMenu-BabelZilla Glossary-OpenTran... Translator for French (fr) My OS Gnu/Linux Translation Credits to Goofy |
QUOTE The steps should be: 1. detect every single and double quoted string (eg. 'Hello' or "Hello") 2. When all strings are found in file I show a summary dialog where you check which string externalize [ ] Hello found at line 3 [x] Quick brown fox found at line 5 With a row below showing original line (useful to understand where string has been found) 3. Externalize selected strings That is exacltly what I was dreaming of! You are really Great ! It is very pleasant for me to have someone who can make something vague and messy in my mind become rational and structured as you are doing. -------------------- Think Global, Make Locales!
![]() You like languages? You should contribute to Tatoeba project! ![]() Sometimes I am on irc://moznet/BabelZilla but you can also drop a word in the shoutbox |
|
|
|
Sep 30 2006, 13:27
Post
#16
|
|
![]() WTS Developer ![]() ![]() ![]() Group: WTS Developer Posts: 498 Joined: 7-August 05 From: Palermo (Italy) Member No.: 79 ![]() Extension Developer: Yes Extensions: Some bonsai extensions Translator for [No translator] |
QUOTE(Goofy @ Sep 29 2006, 07:33) [snapback]19456[/snapback] That is exacltly what I was dreaming of! You are really Great ! It is very pleasant for me to have someone who can make something vague and messy in my mind become rational and structured as you are doing. Please help me to test this version () that contains javascript file strings extraction. Some bugs are present and I know their presence, like - variable name is generated valid but not clever like for xml files - strings on multiple lines are not handled (please ignore it Consider this an alpha version, I think is usable but requires a better debug tracing (I hope this night), help me to discover regression and/or new bugs
Attached File(s)
-------------------- |
|
|
|
Sep 30 2006, 16:26
Post
#17
|
|
![]() Advanced Member ![]() Group: Super Mod Posts: 8.357 Joined: 30-July 05 From: GoofyLand Member No.: 13 ![]() Extension Developer: Yes Extensions: BabelZillaMenu-BabelZilla Glossary-OpenTran... Translator for French (fr) My OS Gnu/Linux Translation Credits to Goofy |
First tests seem to give good results My observations : - there seem to be a useless detection of linebreakers recognized as strings, there are displayed thus : '\n' I suggest they should not break the process, because the sentence is going on in the same string. (no need to break and begin a new string) - the customized name at the beginning og the variable seems to duplicate itself, e.g : CODE var linkalertlinkalertfinding3 (name originally given : "linkalert" (once)but it is possible I made some error while testing (?) [2nd test : I confirm duplication of initial part of variable name) Just as it is, and considering the user must know what he is doing whan choosing strings to process or not, it is already very efficient ! Many thanks again -------------------- Think Global, Make Locales!
![]() You like languages? You should contribute to Tatoeba project! ![]() Sometimes I am on irc://moznet/BabelZilla but you can also drop a word in the shoutbox |
|
|
|
Sep 30 2006, 18:06
Post
#18
|
|
![]() WTS Developer ![]() ![]() ![]() Group: WTS Developer Posts: 498 Joined: 7-August 05 From: Palermo (Italy) Member No.: 79 ![]() Extension Developer: Yes Extensions: Some bonsai extensions Translator for [No translator] |
QUOTE(Goofy @ Sep 30 2006, 17:26) [snapback]19503[/snapback] - there seem to be a useless detection of linebreakers recognized as strings, there are displayed thus : '\n' I suggest they should not break the process, because the sentence is going on in the same string. (no need to break and begin a new string) I'm a bit confused, please may you make an example? QUOTE(Goofy @ Sep 30 2006, 17:26) [snapback]19503[/snapback] - the customized name at the beginning og the variable seems to duplicate itself, e.g : CODE var linkalertlinkalertfinding3 (name originally given : "linkalert" (once)but it is possible I made some error while testing (?) [2nd test : I confirm duplication of initial part of variable name) Yes, confirmed bug. I've already fixed it, I hope to upload on dafizilla a more usable version. -------------------- |
|
|
|
Sep 30 2006, 18:27
Post
#19
|
|
![]() Advanced Member ![]() Group: Super Mod Posts: 8.357 Joined: 30-July 05 From: GoofyLand Member No.: 13 ![]() Extension Developer: Yes Extensions: BabelZillaMenu-BabelZilla Glossary-OpenTran... Translator for French (fr) My OS Gnu/Linux Translation Credits to Goofy |
Here is a screenshot too. By the way, the line numbers are entirely wrong
Attached File(s)
-------------------- Think Global, Make Locales!
![]() You like languages? You should contribute to Tatoeba project! ![]() Sometimes I am on irc://moznet/BabelZilla but you can also drop a word in the shoutbox |
|
|
|
Sep 30 2006, 18:52
Post
#20
|
|
![]() WTS Developer ![]() ![]() ![]() Group: WTS Developer Posts: 498 Joined: 7-August 05 From: Palermo (Italy) Member No.: 79 ![]() Extension Developer: Yes Extensions: Some bonsai extensions Translator for [No translator] |
QUOTE(Goofy @ Sep 30 2006, 19:27) [snapback]19513[/snapback] Here is a screenshot too. Now is clear, ok I can exclude all single char strings and escape sequences. QUOTE(Goofy @ Sep 30 2006, 19:27) [snapback]19513[/snapback] By the way, the line numbers are entirely wrong Oh my God this is true Ok next build will fix also this -------------------- |
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 19th June 2013 - 19:04 |