Jump to content


Important Announcement!

Please read this post about our new Privacy Policy


Photo

AMO Localiser - Ver. 0.3a


  • Please log in to reply
33 replies to this topic

#1 eviljeff

eviljeff

    Advanced Member

  • Members
  • 204 posts

Posted 18 August 2008 - 10:41 PM

Creator: Andrew Williamson
Ext. Version: 0.3a

Extension is compatible to:
Firefox: 3.0 - 3.0.*
Included locales: de-DE en-GB en-US fr-FR it-IT ja-JP nl-NL pl-PL pt-BR pt-PT tr-TR
Description: Simplifies adding localised text to your add-on's description, etc on Addons.Mozilla.Org

 View on WTS -- Download the extension

Edited by eviljeff, 14 September 2008 - 08:50 PM.


#2 eviljeff

eviljeff

    Advanced Member

  • Members
  • 204 posts

Posted 18 August 2008 - 11:03 PM

Thanks everyone (in advance) for contributing. I'm still ironing out some bugs and some procedures in that the add-on is going to be used as a tool to update its own meta-data on amo so please bear with me for a while.

I don't imagine this to go past 0.3 or 0.4 as its supposed to be light-weight simple add-on.

Still to do:
* apply button needs to be enabled on every page in every tab not just the current one
* read chrome manifest - read and process locale lines
* cross match locale lines from manifest with amo.properties matches to get locale->file content
* work with jars inside xpis
* work with pre-gecko1.9 localisation workarounds (specifying {..}.description in prefs.js)
* load automatically on submit pages as we know the xpi.

#3 markh

markh

    BZ Jungle Guide

  • Admin
  • 4070 posts

Posted 19 August 2008 - 06:39 AM

Well, welcome welcomeani.gif with this awaited extension!
While the bankers all get their bonuses I’ll just get along with what I’ve got


#4 markh

markh

    BZ Jungle Guide

  • Admin
  • 4070 posts

Posted 19 August 2008 - 07:23 AM

What exactly do you mean by this?
QUOTE
Reuse Add-on with current page
A brief testing suggested that the latest action should be repeated, is that correct?
While the bankers all get their bonuses I’ll just get along with what I’ve got


#5 eviljeff

eviljeff

    Advanced Member

  • Members
  • 204 posts

Posted 19 August 2008 - 08:25 AM

QUOTE (markh @ Aug 19 2008, 07:23) <{POST_SNAPBACK}>
What exactly do you mean by this? A brief testing suggested that the latest action should be repeated, is that correct?

Sort of. It doesn't reload the xpi/folder, just inserts the data from the last xpi/folder you loaded into the current page. I've not quite got the terminology correct happy.gif

#6 markh

markh

    BZ Jungle Guide

  • Admin
  • 4070 posts

Posted 19 August 2008 - 08:39 AM

QUOTE (eviljeff @ Aug 19 2008, 09:25) <{POST_SNAPBACK}>
Sort of. It doesn't reload the xpi/folder, just inserts the data from the last xpi/folder you loaded into the current page. I've not quite got the terminology correct happy.gif

OK, I have translated as ‘Re-use Add-on data on current page’.
Two remarks:
  • In amo.properties/description: ‘The filename for the properties files are called amo.properties by default.’ I suggest ‘The default filename for the properties file is amo.properties.’
  • The description is not localized; I have attached a version with a localized description here wink.gif

Dutch locale added, tested (well, I don’t have any extensions on AMO so I cannot test fully) and released cool.gif
While the bankers all get their bonuses I’ll just get along with what I’ve got


#7 eviljeff

eviljeff

    Advanced Member

  • Members
  • 204 posts

Posted 19 August 2008 - 09:07 PM

QUOTE (markh @ Aug 19 2008, 08:39) <{POST_SNAPBACK}>
OK, I have translated as ‘Re-use Add-on data on current page’.
Two remarks:
  • In amo.properties/description: ‘The filename for the properties files are called amo.properties by default.’ I suggest ‘The default filename for the properties file is amo.properties.’

Hmm, you're right that the sentence doesn't 'sound' right. I've adopted your suggestion. (And I'm a native English speaker! rolleyes.gif )
QUOTE (markh @ Aug 19 2008, 08:39) <{POST_SNAPBACK}>
  • The description is not localized; I have attached a version with a localized description here wink.gif

I'm using localised install.rdf entries:
(http://developer.mozilla.org/en/docs/Localizing_extension_descriptions#Localizing_in_Gecko_1.9)
rather than the preferences workaround pre Firefox3 its just I had to strip it out to workaround the bug in WTS. The install.rdf will contain the same as the Summary entry in amo.properties.

QUOTE (markh @ Aug 19 2008, 08:39) <{POST_SNAPBACK}>
Dutch locale added, tested (well, I don’t have any extensions on AMO so I cannot test fully) and released cool.gif
smile.gif

I'd be open to suggestions as to the best way to record everyone's name as a localiser - having to do it manually is a chore but I'd like to give everyone credit for their work. The problem is the supported localisations change and having to contact everyone to get their name and email, and then update the install is a nightmare. In AttachmentExtractor I just directed people here which isn't ideal as you have to register to find it out and even then its difficult. I need for localisers to be able to add their own details.

#8 eviljeff

eviljeff

    Advanced Member

  • Members
  • 204 posts

Posted 21 August 2008 - 10:43 PM

No xpi changes but I've added a field in amo.properties called 'LocaliserName' for you to enter your names. My xpi script will then generate <translator> fields for you all in the install.rdf. (Don't start your name with "**" like in the en-US locale or it will be ignored.)

p.s. I accidentally uploaded a .bak file in the xpi. just ignore it or fill it with random text.

#9 eviljeff

eviljeff

    Advanced Member

  • Members
  • 204 posts

Posted 25 August 2008 - 10:17 AM

I uploaded v0.2 to addons.mozilla.org yesterday. Its still in the sandbox so won't update automatically. (If you've used it please consider writing a review. Even AMO editors have to follow the rules and get reviews wink.gif)
I'm trialling having the homepage for the add-on and all the associated support functions on mozdev rather than my own website this time, but there are a few issues I'm trying to sort out.


#10 markh

markh

    BZ Jungle Guide

  • Admin
  • 4070 posts

Posted 25 August 2008 - 12:27 PM

QUOTE (eviljeff @ Aug 25 2008, 10:17) <{POST_SNAPBACK}>
I uploaded v0.2 to addons.mozilla.org yesterday. Its still in the sandbox so won't update automatically. (If you've used it please consider writing a review. Even AMO editors have to follow the rules and get reviews wink.gif)
I'm trialling having the homepage for the add-on and all the associated support functions on mozdev rather than my own website this time, but there are a few issues I'm trying to sort out.

Very nice, I hope you get your reviews in quickly. I noticed that the line breaks you used in the properties file do not work:

While the bankers all get their bonuses I’ll just get along with what I’ve got


#11 eviljeff

eviljeff

    Advanced Member

  • Members
  • 204 posts

Posted 25 August 2008 - 12:42 PM

QUOTE (markh @ Aug 25 2008, 12:27) <{POST_SNAPBACK}>
Very nice, I hope you get your reviews in quickly. I noticed that the line breaks you used in the properties file do not work:

Yeah. I'm considering changing from the javascript newline charactor (\n) anyway as it causes problems if you use the string in javascript and WTS seems to mangle it too also. Might use <br> and convert it.

#12 Goofy

Goofy

    Advanced Member

  • Super Mod
  • 8437 posts

Posted 25 August 2008 - 01:50 PM

smile.gif This is a brilliant idea but closedeyes.gif mmh I am stuck in two issues so I cannot test it unfortunately

1. I have tried to download and install this version here on BZ and got only an error message
Attached File  amolocalizer_installbug.png   6.16KB   7 downloads
(it says "unexpected install error")

2. I have tried to install directly the version on amo sandbox and there has been a strange behaviour

- on install, there was no usual button "restart firefox" to complete install
- when browser has been restarted anyway, I got the Tools menu item correctly, and I tried to select one test xpi of mine (with amo.properties inside), but when validation this process all I got was the error console with nothing in rolleyes.gif

my config
Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1
Think Global, Make Locales!


Sometimes I am on irc://moznet/BabelZilla
but you can also drop a word in the shoutbox

#13 eviljeff

eviljeff

    Advanced Member

  • Members
  • 204 posts

Posted 25 August 2008 - 02:36 PM

QUOTE (Goofy @ Aug 25 2008, 13:50) <{POST_SNAPBACK}>
smile.gif This is a brilliant idea but closedeyes.gif mmh I am stuck in two issues so I cannot test it unfortunately

1. I have tried to download and install this version here on BZ and got only an error message
Attached File  amolocalizer_installbug.png   6.16KB   7 downloads
(it says "unexpected install error")

2. I have tried to install directly the version on amo sandbox and there has been a strange behaviour

- on install, there was no usual button "restart firefox" to complete install
- when browser has been restarted anyway, I got the Tools menu item correctly, and I tried to select one test xpi of mine (with amo.properties inside), but when validation this process all I got was the error console with nothing in rolleyes.gif

my config
Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1

the version on bz is an earlier version (though should still have worked).
The version on amo works for me as I just tested it now with my testing (blank) profile - the lack of install may have been due to the failure in 1.
There isn't supposed to be any dialog as it just works. The error console will contain status messages but you need to have the right settings to enable console dumping (I can't work out which ones now). I'm going to turn off the error console popup as it was really just for development.

Which page didn't the add-on work on? (You can paste a developer panel url as I have admin access on amo)

#14 eviljeff

eviljeff

    Advanced Member

  • Members
  • 204 posts

Posted 25 August 2008 - 02:50 PM

QUOTE (eviljeff @ Aug 25 2008, 14:36) <{POST_SNAPBACK}>
There isn't supposed to be any dialog as it just works. The error console will contain status messages but you need to have the right settings to enable console dumping (I can't work out which ones now).

I forgot I disabled the messages by default rolleyes.gif
To see what's happening you can enable amoLocaliser.debug

#15 Goofy

Goofy

    Advanced Member

  • Super Mod
  • 8437 posts

Posted 25 August 2008 - 04:01 PM

smile.gif a bit better now, thanks for your help. I succeeded on instaling corectly on a clean new profile, then I went to my dev panel for BabelZilla Glossary extension, and tried to use one version of this extension with amo.properties file included. I can see now the added options of your extension on AMO page but seems of no effect.
Maybe just my goofiness:

the variable in amo.properties MUST be named according to this, mustn't they?
CODE
    const AMOFIELDS=new Array('VersionReleasenotes','AddonName','AddonHomepage','AddonSupportemail',
                               'AddonSupporturl','AddonSummary','AddonDescription','AddonEula','AddonPrivacypolicy

if yes it is probably the reason of my failure, since I tried with
ShortDescription=blah
LongDescription=blahbla

??
Think Global, Make Locales!


Sometimes I am on irc://moznet/BabelZilla
but you can also drop a word in the shoutbox

#16 eviljeff

eviljeff

    Advanced Member

  • Members
  • 204 posts

Posted 25 August 2008 - 04:15 PM

QUOTE (Goofy @ Aug 25 2008, 16:01) <{POST_SNAPBACK}>
smile.gif a bit better now, thanks for your help. I succeeded on instaling corectly on a clean new profile, then I went to my dev panel for BabelZilla Glossary extension, and tried to use one version of this extension with amo.properties file included. I can see now the added options of your extension on AMO page but seems of no effect.
Maybe just my goofiness:

the variable in amo.properties MUST be named according to this, mustn't they?
CODE
    const AMOFIELDS=new Array('VersionReleasenotes','AddonName','AddonHomepage','AddonSupportemail',
                               'AddonSupporturl','AddonSummary','AddonDescription','AddonEula','AddonPrivacypolicy

if yes it is probably the reason of my failure, since I tried with
ShortDescription=blah
LongDescription=blahbla

??

The constants there are the ID's that mozilla has used on its webpages.
The properties I've used in the amo.properties are shown here:
http://www.babelzilla.org/index.php?option...type=properties
They're the same without the 'Addon' bit by default but you they're defined in the prefs so they can be changed with about:config if you don't want them called that.

Do you think I should use identical id's?

#17 lloco

lloco

    Moderator for pt-PT forum

  • BabelZillian Mods
  • 78 posts

Posted 25 August 2008 - 10:59 PM

done for pt-PT

#18 Goofy

Goofy

    Advanced Member

  • Super Mod
  • 8437 posts

Posted 26 August 2008 - 12:34 AM

QUOTE (eviljeff @ Aug 25 2008, 17:15) <{POST_SNAPBACK}>
The properties I've used in the amo.properties are shown here:
http://www.babelzilla.org/index.php?option...type=properties

Ok I think I understand now (at last laugh.gif )
QUOTE
Do you think I should use identical id's?

No, everything is fine.

Now my suggestion. Could there be some feature in your extension to help the developer to semi-automatically create the amo.properties file, by means of a form to fill with already-suggested variable names matching the extension, hence amo fields ids :

Summary=
Description=
Homepage=
Supportemail=
Supporturl=
VersionNotes=
DeveloperComments=
Eula=
PrivacyPolicy=
(with no variable in the file if one field left blank)

... once the fields filled, the developer would just download his file, drop it in the extension and here we go.

Would it be possible in the (distant) future ?
Think Global, Make Locales!


Sometimes I am on irc://moznet/BabelZilla
but you can also drop a word in the shoutbox

#19 eviljeff

eviljeff

    Advanced Member

  • Members
  • 204 posts

Posted 26 August 2008 - 09:47 AM

QUOTE (Goofy @ Aug 26 2008, 00:34) <{POST_SNAPBACK}>
Ok I think I understand now (at last laugh.gif )

No, everything is fine.

Now my suggestion. Could there be some feature in your extension to help the developer to semi-automatically create the amo.properties file, by means of a form to fill with already-suggested variable names matching the extension, hence amo fields ids :

Summary=
Description=
Homepage=
Supportemail=
Supporturl=
VersionNotes=
DeveloperComments=
Eula=
PrivacyPolicy=
(with no variable in the file if one field left blank)

... once the fields filled, the developer would just download his file, drop it in the extension and here we go.

Would it be possible in the (distant) future ?

Hmm, possibly. I wasn't really planning on creating any kind of gui as the user of the add-on is a developer who should know how to navigate about:config once to set it up if necessary. Creating the file with the entries to fill in though should be pretty easy.

#20 Goofy

Goofy

    Advanced Member

  • Super Mod
  • 8437 posts

Posted 26 August 2008 - 09:52 AM

QUOTE (eviljeff @ Aug 26 2008, 10:47) <{POST_SNAPBACK}>
Hmm, possibly. I wasn't really planning on creating any kind of gui as the user of the add-on is a developer who should know how to navigate about:config once to set it up if necessary. Creating the file with the entries to fill in though should be pretty easy.


smile.gif Sure decent developers don't really need help to write a simple .properties file. What I suggest is just a question of having the job half done quickly with no question like "btw, what shall I choose as variable names? Do they have a field for Version notes on AMO?" and the kind.

thanks for you promising answer, maybe you will give it a try when you have one minute left rolleyes.gif
Think Global, Make Locales!


Sometimes I am on irc://moznet/BabelZilla
but you can also drop a word in the shoutbox


2 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users


    CCBot (2)