Categories
main mozilla tech

Falsy Values – volunteer opportunity

In just about a week Warsaw will be hosting a major JavaScript event – Falsy Values.

Falsy Values is brought to you by the two people – Damian Wielgosik and Paweł Czerski – who made their way onto the Web Event Stage last year with their widely praised Front-Trends conference.

This year, they focus on hardcode JavaScript. This conference is not about soft disciplines, not about social science, it’s solely about hacking the modern Web.
With stellar workshops and talks, with names such as Douglas Crockford, Tantek Çelik, Tom Hughes-Croucher and our homegrown stars like Kornel “porneL” Lesiński, it has what it takes to be the powerful event to be at.

Now, such an event is not going to happen on its own, it takes passion, dedication and the one thing we all should value most – time – to shape it up and deliver.

One of the unique features of this conference is that it really is handmade by those two fellows who work 24/7 right now to plug all the cables in the right slots, bring supply to the tables and speakers to the microphone.

All hands on deck!

As you may have guessed from the title – we believe we could use some help during the event itself!

If you’re located in Warsaw, or if you will be here for the time of the event, and you’re looking for a chance to participate in what’s going to happen there, help us make it perfect, learn the unique lesson from behind the scenes, here’s your chance!

We’re looking for geeks who seek experience in helping us run this event. Several brave souls to support speakers, guide the crowd through the agenda, run fiercely to aid some brother in JavaScript arms who’s in danger of any kind (like – you know that moment when your WiFi doesn’t work?)

We expect you to be there with us (even an hour before the opening), assist when needed and enjoy the conference. We offer an opportunity to learn, gain experience and help us make the best event in the JavaScript world since Brendan invented this monster!

Get in touch with us! Email me (gandalf at mozilla dot org)  or contact Damian and Paweł directly and we’ll go from there. Hurry up, we only have 5-7 slots available!

Categories
main mozilla tech

L20n gets tangible

While Firefox 4 was the main focus for the last weeks and months, I’ve been also making progress with the next iteration of Mozilla localization technology – L20n.

Here are three things that constitute a milestone for me and should make it much easier to test and play with the features of it.

Toolbox

Toobox guides you through the examples of various localization scenarios and how L20n solves them. It blends incremental learning of features available to both developer and localizer. At the bottom it contains several more complex example that should rarely happen but constitute the latter part of Pike’s “easy things easy, complex things possible” mantra.

XPCShell tests

It’s a small (two at the moment) set of tests that run l20n code. It’s a great start point to play with how the library works and how the format works. You can adjust the compiled code, or the library code and see if it gives the expected result.

Live toolbox

What can be better than a toolbox for a geek? Yes. A live toolbox. A toolbox you can not only read, but one that you can actually touch, change, hack on and see the result live.

It’s a hack itself, so don’t be harsh pls, but it does the job. I even included a set of 7 examples (example1 to example7) that correspond to what you can find in the Toolbox. Feel free to modify the L20n code, see if it compiles properly, play with the compiled code, change the HTML or JS and see the results live!

Also, if you encounter a bug, you can save your code and send it my way so that I can investigate it. The compiler is just an initial approach, and a moving target right now as we still don’t have a finalized JS structure schema, but it works for most simple and medium complexity cases, so I’d say it’s ready for you to play with it!

Next steps

Now, that we have Firefox 4 released (yay!), and mozilla-central is open again, I hope to work on landing the initial set of L20n Gecko bindings which requires some updates to the patches themselves first. With that part, we’ll be able to start investigating migration away from current DTD/properties format into the wonderland of L20n.

 

Categories
main mozilla po polsku tech

Web O’Wonder po polsku!

Pisałem niedawno o kampanii Web O’Wonder.

Niedługo po moim poście zgłosił się do nas Krzysiek Wróblewski i zaoferował swoją pomoc. Pomogliśmy mu założyć konto na Verbatimie, przygotowaliśmy stage, i prace ruszyły. Liderem lokalizacji był Krzysiek, pomagał mu Leszek “Teo” Życzkowski, a ja starałem się by ich praca napotykała jak najmniej przeszkód.

Krótki wywiad:

G: Jak dowiedzialeś się o projekcie i co sprawiło że się zgłosileś?
K: O projekcie dowiedziałem się oczywiście z Twojego bloga na Polskiej Planecie Mozilli. Zgłosiłem się, bo chciałem zobaczyć jak przebiega proces tłumaczenia i miałem trochę wolnego czasu 🙂

G: Jak Ci się pracowało przy nim?
K: Pracowało się bardzo dobrze, na początku musiałem opanować Verbatima, ale nie było to trudne, szczególnie z pomocą pana Leszka. Nie zdziwiło mnie za to, w jaki sposób Wasz zespół dyskutuje na temat najdrobniejszych szczegółów, bo z tego jesteście znani 😉

G: Co bylo najtrudniejsze?
K: Co było najtrudniejsze? Konieczność porzucenia takich ładnych czcionek na rzecz standardowych, z powodu niedostępności polskich znaków 😛

G: Ile czasu zajęło Ci to tłumaczenie?
K: tłumaczenie zajęło chyba z tydzień, co raczej nie jest mistrzostwem świata, ale nie żałuję poświęconego czasu 🙂

Po zakończeniu pracy nad Web O’Wonder, Krzysiek pomaga przy kilku innych projektach specjalnych – tłumaczy m.inn. grę mobilną Spark. Poza Krzyśkiem, pomaga nam też Pitazboras, oraz siecobywatel, a gro pracy wykonał Teo.
Poza wysokiej jakości tłumaczeniami, Krzysiek napisał także dodatek do Thunderbirda – Glasser i mam nadzieje, że będzie miał ochotę na pracę z naszym zespołem przy następnych projektach 🙂

A za tłumaczenie WoW należą się Krzyśkowi gratulacje!

p.s. Jeśli masz ochotę się przyłączyć i pomóc z tłumaczeniem, załóż konto na Verbatimie i dodaj sugestie. Jeśli chciałbyś (chciałabyś) przejąć któreś z tłumaczeń, wyślij mi maila na zbigniew at aviary kropka pl.


Categories
main mozilla tech

Crazy times for the localizers

March of 2011 is special for all of us. It’s the Firefox 4 release month and the whole project is operating in it’s “crazy” mode.

One particular plane on which it’s pretty visible is localization as we’re involved in almost every aspect of the release, every little detail, every step of the product release, every engagement campaign and of course in every bit of discussion about the state of the web that happens in our respective countries.

The story

As an organization that has glocalisation imprinted on the very fabric of its universe, we always feel responsible for making sure that everything we do is localizable, so that our communities around the world can translate and adjust everything that Mozilla project creates and use it to promote the Mozilla mission in their regions.

That’s easy to say, much harder to do. Especially as we grow, and the number of projects that we touch goes up. Firefox 4 release brings an unprecedented number of web projects that are part of our push to make bring the web to the next level.

Those projects vary from HTML5 demo sites, through Mozilla Developer Network Demo Studio, social web projects for twitter and facebook, web games to new Mozilla Foundation campaign – Join Mozilla. In total, I believe, we’re preparing 12 separate projects that we call “special projects” that are going to more or less closely accompany Fx4 release (not to mention Firefox 4 l10n itself, and our major projects like SUMO, MDN, AMO).

Each of the projects is very different and unique, uses different set of technologies and is embedded into different environment and yet we need to unify it for our localization community so that they don’t have to learn how to localize each of them separately.

Given the usual amount of challenges multiplied by 12 different setups it could have been a mess and it should have been impossible, but thanks to a great work done mostly by Staś Małolepszy, our team of l10n-drivers unified the experience as much as possible and localizers are right now doing an amazing job by bringing those special projects to every corner of the Earth, to billions of people.

Below is a summary of what happens there.

Categories
main mozilla po polsku tech

Mini kampania z okazji wydania Firefoksa 4

Wraz z nadchodzącym wydaniem Firefoksa 4 Mozilla planuje małą kampanię promującą HTML5&Friends.

Aviary.pl szuka osób chętnych do pomocy w tłumaczeniu tej strony. Oferujemy dostęp do serwera testowego, niewielką ilość stringów do przetłumaczenia i sporą dawkę zasłużonego poczucia dobrze wykonanej roboty.

Zainteresowanych zapraszam do mailowania do mnie (zbraniecki at aviary dot pl) lub od razu do wejścia na Verbatim –  – zakładasz konto i dodajesz sugestie.

Uwaga, wysoka jakość tłumaczenia może skutkować niemoralnymi ofertami dalszej współpracy ze strony Aviary.pl 😉

Categories
main mozilla tech

Hard Blockers Counter 1.0

A little bit more of coding, a few bug reports later, HBC is ready for its prime time. Version 1.0 fixes the nasty toolbar height problem, it gives a user an indication of the interval covered by his plot and is just overall better.

It can be downloaded from an addons.mozilla.org listing, and the source code is available at builder.addons.mozilla.org. 🙂

A few of the lessons learned and thoughts:

  • builder is awesome, but it needs more real life users. A lot of bugs are only reproduced after you write your extension for some time, hundreds of revisions etc.
  • AddonSDK is excellent for this kind of extensions. It has everything you may want and makes the whole code extremely clean and simple to write and maintain. Just look at it – about 50 lines of core code – your cat could read that.
  • AddonSDK needs more real life users. Like with the builder, bugs show up only when you really use the extension you created.
  • AMO is an excellent developer friendly platform – it gives me a lot of satisfcators in a form of stats, and ability to manage my extension release process.
  • AMO-builder bindings need more real life users. I felt like I’m the first to try to push builder based extension to AMO – many trivial bugs that can be only revealed if you try to go through the whole thing.
  • AMO’s review/release process is excellent for the extension of the Old Days. It gives us a pool of high quality, verified extensions, that are easy to find and safe to use. It does not work with agile development. Builder and AddonSDK makes creating ad-hoc extensions super simple and quick (literally, 2 hours and you’re done with the first version, every new version is about 15 minutes of work). When you then push it to AMO it feels like Matrix slow motion then – you suddenly wait days for a preliminary review, not to mention almost two weeks you have to wait for a full review. My last revised version is super old comparing to what I claim to be the “stable” one now 🙁

This issue requires a little bit of description. I do not try to say here, that what AMO reviewers are doing is wrong – quite the opposite, I believe the whole process is excellent and anything that is exposed to the millions of users should get some time to season and be tested and be reviewed. It’s just that AddonSDK/Builder gives you a totally different setup that fits different needs. I believe AMO will need a workflow for extensions that are created in 10 minutes, distributed in 20 minutes, updated 5 times during 4 hours and are becoming useless after one or two days.

Think of a conference where schedule is updated often and people have hard time to track it. Using AddonSDK/Builder you can create an extension for it in literally 20 minutes (xhr, panel, widget). AMO is excellent for distributing it, updating your users etc., but it requires very different approach than say, AdBlock or Firebug. Then, you add a feature (ability to mark the talk you want to attend and get a notification when its room/time changes) and upload a new version 15 minutes later. You want to switch all your users to the new one now. Then you fix a small bug affecting linux users, and update users once again.

It’s amazing that Firefox is becoming a platform where it is possible, and I can’t wait for such application for AMO 🙂

  • AddonSDK requires a lot of users with their use cases. Myk’s approach is to iterate often which means to get version 1 ASAP and then add new features for version 2 instead of trying to build an ultimate solution without a release. I love this approach and it serves AddonSDK well, but now we need version 2 of many of the packages there – it can only be done if people start using the packages for a real life extensions and report what they miss. Like – Widget content cannot be easily themed. Or, you cannot control Panel’s scrollbar appearance. Jetpack team cannot plan for those use cases, they have to come from jetpack users. So be brave! Try things, report everything you need! 🙂
  • There is a group of at least 500 people who deeply care about our release process. They’re ready to increase the amount of items on their screen to have a continuous updates on our progress toward Firefox 4. And it’s been just two days. It can motivate people to help, make them feel the sense of progress, help them understand the challenges better. It sucks outsiders closer to the inner circle. I believe we can do much more and the nightly users, mozilla planet readers and the audience of my extension deserve the chance to get more info which can help them start contributing! 🙂

Categories
main mozilla tech

Firefox 4 hard blockers counter

Last night was a usual “15 hours on a plane brings your sleep cycle into the fifth dimension” one for me.

I was pondering through the planet mozilla and realized that despite great effort from our UX Team, Firefox 4 nightly does not show up the single, most important information piece about the state of my browser, it does not answer the question that our whole project is living now:

How many blockers do we have until we reach Release Candidate

Well, you probably can imagine everything from there – now, I present you the missing piece – Fx4 Hard Blockers Counter extension in its full glory.

Source code available.

Categories
main mozilla po polsku tech

Video w sieci rok później

Rok temu popełniłem wpis, w którym opisałem jak wygląda sytuacja z kodekami wideo, stanowisko jakie Mozilla Foundation przyjęła w tej kwestii oraz widoki na przyszłość.

W komentarzach napotkałem duży opór, większość komentujących miała zdanie skrajnie odmienne ode mnie, pisząc o nieuchronnym upadku Mozilli, rychłym spadku popularności Firefoksa, bezsensowności stawania na przekór tak potężnym firmom jak Google, Apple czy Microsoft…

Wystarczy, nie lubię wyżywać się, a poza tym tamta dyskusja była nie fair – ja pisząc to wiedziałem, że Google uwolni VP8, moi rozmówcy mogli odczytać moje słowa jako pobożne życzenia – wszak nic wtedy jeszcze na to nie wskazywało.

Summa summarum, dziś sytuacja jest odmienna. Wydaje mi się, że nasza postawa miała niebagatelny wpływ na decyzje Google o porzuceniu h.264, choć sądzę, że nasz wpływ był raczej pośredni – zatrzymaliśmy adopcję h.264, utrzymaliśmy pole otwartym, tak, że Google opłacało się postawić na WebM. Jestem dumny z tego jak Mozilla korzysta ze swojej pozycji do realizacji celów statutowych.

Nie wygraliśmy tego jeszcze – wciąż do przekonania są Apple i Microsoft i podejrzewam, że ta druga firma będzie łatwiejszym partnerem, ale krajobraz po roku czasu jest znacząco odmienny.

Co przyniesie następny rok? Sądzę, że dystans jaki dzieli WebM i h.264 w zakresie wsparcia sprzętowego zniknie, Adobe Flash zacznie wspierać VP8 (a może i WebM?), Microsoft dołączy wsparcie dla WebM, a Apple stanie przed trudnym wyborem… a jak będzie naprawde? Czas pokaże 🙂

Categories
main mozilla tech

Using Common Pool – Tutorial

In this post I’m going to show you how to make your extension localizable via Common Pool and how it can be localized.

early adopter warning: It’s the first attempt, it’s a new concept, things may brake, things may be a little rough, stay calm. It’s not a replacement for a well known solutions yet, but it may be one day. Play with it, hack the service and the library, suggest improvements, report the issues, but stay calm whatever happens – there may be dragons.

Using the library

Since Common Pool is currently implemented in Addon SDK, I assume you’re using it for writing your extension. First thing is to add my localization module to your extension. It’s available at http://builder.addons.mozilla.org.

Once you have it in your dependencies, you can just include it into your code.

Let’s take an example Hello World code:

var notifications = require("notifications");

var menuItem = contextMenu.Item({
  label: "Hello World",
  contentScript: 'on("click", function (node, data) {' +
    '  postMessage(node.src);' +
  '});',
  onMessage: function (imgSrc) {
    notifications.notify({
      title: "Hello World",
      text: "Welcome to the new, wonderful world!",
    });
  }
}

Now, in order to make it localizable, all we need to do is to add one require, and change the string initialization:

var notifications = require("notifications");
var _ = require("localization").get;

var menuItem = contextMenu.Item({
  label: _("Hello World"),
  contentScript: 'on("click", function (node, data) {' +
    '  postMessage(node.src);' +
  '});',
  onMessage: function (imgSrc) {
    notifications.notify({
      title: _("Hello World"),
      text: _("Welcome to the new, wonderful world!"),
    });
  }
}

Done! That’s what I meant when I wrote that Common Pool is asking as little attention from the developer as possible. If it reminds you of common patterns used by GetText, you’re right on spot. We like this notation, we reuse it.

With such code, you’re ready to go 🙂 As a developer, you can move along, do your work, deploy your extension on AMO and never ever bother about this again, while we will make sure that the localizers can localize, and users will receive the localized version dynamically. 🙂

Early adopter warning: For the time of the field testing of this library, we do not actually have any integration with AMO, so when you want your addon to be localized, you need to “cfx xpi” it, or if you’re using the builder just click on “Download” and upload the result xpi here: https://l10n.mozillalabs.com/projects/p/mozilla-jetpacks/upload/. This is a temporary step

Using the web service

Once a developer uploaded his addon and his job is done, the camera shifts onto another hero – a localizer. This brave soul, can just go to https://l10n.mozillalabs.com, log in and start localizing. As a localizer, you can just select your locale and start localizing. You can filter by an extension and you can view how other locales localized it.

You can also select overrides and add one for a given jetpack or occurrence. When you finish localizing your jetpack, you’re done. We will spread your translation to all users of the jetpack who use your locale. If you later update your translation, all users will receive an update on the next day. Isn’t that awesome? 🙂

Early adopter warning: Until we fix bug 10, we refer to jetpacks by their unique ID, instead of the human readable name. It should be fixed soon 🙂

The beauty of early adopting

Well, that being said, you know you would not be happy to receive a complete, ready to use, bug free solution. That’s not what hackers life is about. In fact, we decided to blow quite a big hole through the middle of the road that’s called “First Run Experience“.

As we were working on the library, and the webservice, and how nicely they’re tied, and we enjoyed the experience of a user staying up to date with localization of his extensions, and being able to download an extension in en-US and then see it localized on the day when a localizer finishes localizing it… we actually did not solve a pretty important case. Here’s the issue:

When a user installs an extension it contains no translation resources bundled with it. On the first run, we asynchronously ask the localization web service for the entities used by the extension. So far so good.

The server asynchronously sends the user all the entities and they’re cached. From that moment every request for a string will work by providing a translation of the string. But what happens before we cache?

Well, for now, nothing. Bummer 🙁 Basically, until we cache the strings, all we have is an empty cache and the localization library will just return the english strings which is the default fall back.

The bug for that is reported, bug 619807, and we’re working on a solution for that. We may decide to bundle entities that we have available for the extension together with it at the time of download, but that will be just a workaround. An ideal solution would be to pull the localizations together with the addon (as a part of addon installation experience) and then check if there are any localization updates on a normal daily routine.

If you have any ideas, suggestions or code snippets that solves it – feel free to jump in and help! 🙂

Real Life Example

Take a look at this example extension, Translate Selection with l10n. Now, go to l10n.mozillalabs.com to see its localization and localize it live.

Next time you run this extension you should be able to see it working with localization (assuming your browser is using your locale and minus the First Run Experience bug).

That’s all. 🙂

Summary

Common Pool is a simple, yet very powerful solution. It solves a lot of issues that we’ve been struggling with since the beginning of times. It makes internationalization easier than ever, localization easier than ever and synchronization easier than ever. Bare in mind, it’s intended as a solution for simple strings, for developers who don’t have much time to think through their UI’s and plan it for localization, and for massive localization of tons of thousands of extensions.

We believe it nails it perfectly (with the few early adopters hiccups that we’re working on right now, and an unlimited number of issues that are awaiting to be discovered by you!), and we want to improve it until we feel it to be the right one.

At the same time, please, remember that for a more complex and sophisticated UI’s, the ones where a developer has to think about entities, and the localizer wants to fine tune each and every sentence – we’re going to work on a complementary, L20n based solution.

Now, it’s your turn to play with it, hack on it, give us feedback and help us evaluate the solution. We’re available at irc.mozilla.org #l10n and #jetpack channels, and we use mozilla-labs-jetpack group that you can use. For bugs in the l10n web service, please, use its bitbucket issue reporting system. Thanks! 🙂

Categories
main mozilla tech

Jetpack Localization – Common Pool approach

Jetpack project is taking an aim at rewriting the extension system, learning from the past, responding to the feedback and thinking outside of the box. So when the Jetpack team approached L10n-Drivers and asked for support with building localization infrastructure for new addons, we decided to go the same way. 🙂

Common Pool

The first approach we’re presenting you is called Common Pool (yup, that’s not a very creative name) – it’s basic assumption is that most jetpacks are small applications with a minimal UI. And there are going to be tons of them. We already have tens of thousands of extensions, and Jetpack with its nice API and builder are going to make it much, much easier to write a good extension.

We also made some observations – There are common phrases, like “Cancel“, “Ignore“, “Log in” that are replicated over and over in almost every extension. It’s becoming hard to localize it, hard to keep it consistent and maintain the localization. On the other hand, extension authors are struggling to work with localizers as they need to iterate fast and  string freeze phases are adding a lot of cost to the release process.

For that reasons we decided to build on a basic concept of entities shared across extensions, stored on a server, and pulled by the jetpack itself.

Shared entities are powerful. For a localizer it means that we can show you the list of mostly used entities and if you localize 20 of them, you localized 50, 100 or maybe 500 extensions. You can update a translation and have it translated the same way across all extensions. You can localize only one extension and your work will probably benefit other extensions as well. You can localize today, and tomorrow all users will get updated localizations. How cool is that? 🙂

For a add-on developer it also means more good. You can pick entities that are already localized into many languages and have you extension Just Work. You don’t have to worry about releases and localization because if you only make thing localizable, users will be able to pull localizations as they appear. It means less to think about.

Now, there are of course some trade offs. One of them is that not all translations of a word should be equal. For that reason we propose a concept of an exception. Actually, two of them.

First one is a per-addon exception which allows localizers to localize a given string differently for this particular addon. It’s important when the addon uses some specific vocabulary.

Second one is a per-case exception which allows localizers to divert from the common translation for a specific use case. Say, the use case in jetpack X, file main.js line 43 should be translated differently.

Library and the Web Service

So, that’s the concept, and it has been implemented as a library. Yahoo! Now, for such a solution to work, we knew we need a partner in crime. We need a web service that will support Common Pool and allow for addon localization. We knew we will want to merge it with AMO and the Builder, so django was a preferred technology, and one other requirement was to be able to support a localization storage model that is substantially different from the industry standard.

Fortunately, at the time when we conceptualized Common Pool, our friends from Transifex were reworking their storage model away from gettext-specific to much more generic database driven one. Well then – good time to see how generic it can be, right?

Together with Transifex team, mainly Dimitris Glezos and Seraphim Mellos we’ve been working on the Common Pool web service that can back up the library and become a localization web tool. Today, the first iteration of the tool is alive at – https://l10n.mozillalabs.com! The source code is GPL and available at transifex-commonpool bitbucket repository and that’s where we’re collecting bugs as well.

What’s next?

Now we have to prove that the concept in the field. We’re challenging the status quo, so it’s on us to validate it. We’re going to reach out to extension authors and localizers alike to get support and testing coverage and if we that it works, we’ll include common pool library into Addon SDK 1.0. It’s up to you to help us evaluate it!

Then, it’ll be time to complement Common Pool with another architecture, that does not solve the simple cases that easily, and require much more active work from the developer, but will provide better level of details for both parties. The solution we want to offer is L20n.

Bundle pack ahead

Together, Common Pool and L20n should provide everything that localizers and developers may need pushing the limits and stretching what’s possible with the localization. We think of a Common Pool as a great generic, easy solution for most common strings, while L20n complements it with more sophisticated, more powerful approach for the developers whose extension reached the level when they want it to be localized with more attention and where the UI requirements are higher.

Let me know what you think – I know it’s early, I gave many talks about those technologies to our Mozilla communities, but I realize that it’s hard to evaluate without actual code in hand, so now is the time for feedback, feedback, and even more feedback 🙂

In the next blog post I’ll explain the steps to create your first common-pool driven extension.