Jump to content


Important Announcement!

Please read this post about our new Privacy Policy


Photo

[Firefox extension] Skip to YouTube All Comments


  • Please log in to reply
10 replies to this topic

#1 ddawson

ddawson

    Advanced Member

  • Members
  • 86 posts

Posted 13 September 2013 - 01:59 PM

Hello, everyone. This is an SDK add-on, so the WTS can't handle it right now. Fortunately, there's only a small amount to be translated.

Add-on name:
QUOTE
Skip to YouTube All Comments

Short description:
QUOTE
Directly access YouTube "All Comments" pages

Long description:
QUOTE
Use a YouTube video link to go straight to its "All Comments" page, so you can see all of the comments without having to pass through the "watch" page, which is inconvenient and inflates the view count.

Right-click on a hyperlink (this works even if the video URL is encoded inside another URL, such as in Google search results), or highlight a URL in text and right-click on it. You can open the "All Comments" page either in the current tab or a new one.

Add-on strings:
These are both for the main context menu.
Also available as a .properties file: Attached File  en_US.properties   161bytes   2 downloads
QUOTE
Open video's "All Comments" page
Open "All Comments" page in new tab


Please reply with your translations of the above descriptions and strings. I don't care if you write it directly in your message or attach a file, though this forum treats some characters better than others. Please note: I prefer to receive the translated strings as .properties files, or as plain text forum attachments or messages (but be careful the forum doesn't eat any of your text), rather than JSON files. Be sure to tell me what encoding you use for attached text files.

How to test
  1. Install Alexandre Poirot's Locale Updater extension if you don't have it already. If for some reason you're not willing to install this, see "The hard way" below.
  2. Install Skip to YouTube All Comments extension from here: Attached File  skiptoytallcomments.xpi   173.15KB   5 downloads
  3. Download the en-US.properties file from here: Attached File  en_US.properties   161bytes   2 downloads
  4. Rename the file, changing the "en-US" to your locale code (use a hyphen, not an underscore), and edit. Make sure you use UTF-8 encoding. Translation of each line goes after the "=" sign.
  5. In Firefox, go to the Add-ons Manager (Tools > Add-ons, Firefox > Add-ons, or whatever, depending on your setup).




    (Sorry, no screenshot appropriate to Mac OS X.)
  6. Find "Skip to YouTube All Comments" extension, and click the "Update l10n" button.
  7. Select your edited .properties file.
  8. You should now be able to test your locale. I suggest going to the YouTube main page to find video links to test.

You may upload your .properties file here as part of your submission. Thanks.

The hard way

Follow these instructions if for some reason you don't want to install the extra helper extension above; otherwise, follow the above instructions and ignore these. To make things concrete, the following instructions assume you're translating to the zh-CN locale. Substitute your own locale code where this appears.
  1. Download the add-on archive here: Attached File  skiptoytallcomments.xpi   173.15KB   5 downloads
  2. Unpack to wherever you like (unless you're able to edit the archive in-place—it's just a regular ZIP file—in which case, you could do the following in-place).
  3. Find the "locale" directory, make a copy of en-US.json, substituting the code for your own locale (e.g. zh-CN.json), and edit (encoding: UTF-8). Translated strings go in the second string of each line:
    CODE
    {
    "Open video's \"All Comments\" page": "TRANSLATION HERE",
    "Open \"All Comments\" page in new tab": "TRANSLATION HERE"
    }
    If you use any double-quote characters in your translation, each one must be preceded by a backslash \.
  4. Edit the top-level file "locales.json", and add your locale code to the list.
    Ex: change
    QUOTE
    {"locales": ["en-US"]}
    to
    QUOTE
    {"locales": ["en-US","zh-CN"]}
  5. If not editing in-place, zip it back up, with a ".xpi" extension. (Make sure the top-level files are still at the top level in the archive.)
  6. In Firefox, go to the Add-ons Manager (Tools > Add-ons, Firefox > Add-ons, or whatever, depending on your setup). (See above section for screenshots.)
  7. Click on the drop-down list next to the search bar, and select "Install add-on from file".

  8. Select the archive you just edited or (re)zipped.
  9. Confirm the installation.
  10. The add-on does not require a restart; you should be able to use it immediately. I suggest going to the YouTube main page to find video links to test.


On a side note, getting this up wasn't too hard, but I do look forward to when the WTS can handle SDK add-ons.

#2 markh

markh

    BZ Jungle Guide

  • Admin
  • 4070 posts

Posted 15 September 2013 - 08:51 AM

Dutch locale (nl) has been added and tested. Works fine!
AMO fields:
Add-on name:
CODE
Skip to YouTube All Comments

Short description:
CODE
Rechtstreeks toegang tot de pagina’s “Alle reacties” in YouTube

Long description:
CODE
Gebruik een videokoppeling op YouTube om rechtstreeks naar de pagina “Alle reacties” te gaan, zodat u alle reacties kunt lezen zonder via de pagina “Bekijken” te hoeven gaan, die onhandig is en alleen maar de weergaveteller verhoogt.

Rechtsklik op een koppeling (dit werkt zelfs als de URL naar de video is versleuteld in een andere URL, zoals in zoekresultaten van Google), of selecteer een URL in tekst en rechtsklik er op. U kunt de pagina “Alle reacties” in het huidige tabblad of een nieuw tabblad openen.

Add-on strings:
CODE
Pagina “Alle reacties” openen in nieuw tabblad
Pagina “Alle reacties” van video openen


I noticed that the description in the add-on manager was not localized, so I have taken the liberty to slightly change install.rdf to facilitate this. Altered xpi is attached, for your reference wink.gif

Oh, and .json files are accepted by the board now closedeyes.gif
While the bankers all get their bonuses I’ll just get along with what I’ve got


#3 ddawson

ddawson

    Advanced Member

  • Members
  • 86 posts

Posted 15 September 2013 - 01:53 PM

QUOTE (markh @ Sep 15 2013, 00:51) <{POST_SNAPBACK}>
Dutch locale (nl) has been added and tested. Works fine!

Thanks. I'll add it.

QUOTE
I noticed that the description in the add-on manager was not localized, so I have taken the liberty to slightly change install.rdf to facilitate this. Altered xpi is attached, for your reference wink.gif

I'll see if I can find out to what extent AMO accepts XPI modifications for SDK add-ons. They use an expedited review process for add-ons that use only the high-level APIs in the SDK, since it's easier to verify the code isn't doing anything malicious. I imagine it means certain things in the XPI must not be messed with.

Then again, maybe it doesn't make that big a difference.

In any case, I believe they're relying on the fact that metadata received from AMO overrides that contained in the XPI when downloaded from AMO, which is how they're able to auto-update compatibility.

#4 Goofy

Goofy

    Advanced Member

  • Super Mod
  • 8437 posts

Posted 16 September 2013 - 08:03 AM

smile.gif Hi here is French stuff for this smart little extension (all UTF-8)

Attached File  fr.json   219bytes   2 downloads

Attached File  AMO_localized_info.txt   847bytes   3 downloads

Attached File  localized_install_metadata.txt   494bytes   2 downloads

As for the art of having things localized for jetpacks, maybe you will find alexandre Poirot little extension interesting: http://blog.babelzilla.org/2012/04/12/lets...tpacks-at-last/ but maybe it is annoying extra work from a developer point of view. Let us know smile.gif
Think Global, Make Locales!


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

#5 ddawson

ddawson

    Advanced Member

  • Members
  • 86 posts

Posted 16 September 2013 - 01:26 PM

QUOTE (Goofy @ Sep 16 2013, 00:03) <{POST_SNAPBACK}>
smile.gif Hi here is French stuff for this smart little extension (all UTF-8)

Thanks.

QUOTE
As for the art of having things localized for jetpacks, maybe you will find alexandre Poirot little extension interesting: http://blog.babelzilla.org/2012/04/12/lets...tpacks-at-last/ but maybe it is annoying extra work from a developer point of view. Let us know smile.gif

Not really something useful to me. But I definitely think it will make things easier for translators, so I modified the testing instructions to make use of it. Thanks for the tip.

#6 Lakrits

Lakrits

    Daredevil Test Pilot

  • Admin
  • 894 posts

Posted 16 September 2013 - 03:00 PM

Please find the Swedish (sv-SE) language files inside the attached ZIP file.

The ZIP files contains the JSON locale file, a file with install.rdf info for sv-SE, and a TXT file with AMO info for sv-SE.

Je glaube that erat allt,

Lakrits

Attached Files


"[…] och han talar med bönder på böndernas sätt
men med lärde män på latin." – Erik Axel Karlfeldt

Lakrits
BabelZilla admin
Moderator for the Swedish BabelZilla forum section

#7 ddawson

ddawson

    Advanced Member

  • Members
  • 86 posts

Posted 16 September 2013 - 06:01 PM

QUOTE (Lakrits @ Sep 16 2013, 06:00) <{POST_SNAPBACK}>
The ZIP files contains the JSON locale file, a file with install.rdf info for sv-SE, and a TXT file with AMO info for sv-SE.

Thanks, but I think you better try again. All I see is install-rdf_sv-SE.xml. (Using Info-ZIP to extract.)

Also, at this time, for the strings I would prefer a .properties file or plain text file or even just the strings in the forum post, rather than a JSON file. I know I was asking for that before; that was because it was the easiest way I knew of for translators to test. Now that Goofy pointed me to a handy translator tool, it's easier for everyone to use .properties files (easier for me too, since the SDK's cfx tool uses them as the source format). Sorry for the confusion.

#8 Lakrits

Lakrits

    Daredevil Test Pilot

  • Admin
  • 894 posts

Posted 16 September 2013 - 07:09 PM

QUOTE (ddawson @ Sep 16 2013, 19:01) <{POST_SNAPBACK}>
Thanks, but I think you better try again. All I see is install-rdf_sv-SE.xml. (Using Info-ZIP to extract.)


Second try smile.gif

(No PROPERTIES file, since I don't know your string keys. Sorry.)

Lakrits

Attached Files


"[…] och han talar med bönder på böndernas sätt
men med lärde män på latin." – Erik Axel Karlfeldt

Lakrits
BabelZilla admin
Moderator for the Swedish BabelZilla forum section

#9 ddawson

ddawson

    Advanced Member

  • Members
  • 86 posts

Posted 16 September 2013 - 10:33 PM

QUOTE (Lakrits @ Sep 16 2013, 11:09) <{POST_SNAPBACK}>
Second try smile.gif

Better. Thanks. smile.gif

QUOTE
(No PROPERTIES file, since I don't know your string keys. Sorry.)

Guess I'll make the link more prominent or something. No need to do any more, though. I'll take care of the rest for this locale.

#10 ddawson

ddawson

    Advanced Member

  • Members
  • 86 posts

Posted 20 September 2013 - 06:57 PM

I submitted version 1.0 today. Thanks for your translations so far.

#11 Lakrits

Lakrits

    Daredevil Test Pilot

  • Admin
  • 894 posts

Posted 20 September 2013 - 08:37 PM

QUOTE (ddawson @ Sep 20 2013, 19:57) <{POST_SNAPBACK}>
I submitted version 1.0 today. Thanks for your translations so far.

You're welcome.

And thank YOU for being so patient with facultative tech-idiots like me! smile.gif

/Lakrits
"[…] och han talar med bönder på böndernas sätt
men med lärde män på latin." – Erik Axel Karlfeldt

Lakrits
BabelZilla admin
Moderator for the Swedish BabelZilla forum section


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users