Fr:Ubiquity 0.1 Author Tutorial: Difference between revisions

Line 171: Line 171:
Dans le futur, nous travaillerons sûrement sur la rationalisation [NDTR: streamlining] de ce procédé.
Dans le futur, nous travaillerons sûrement sur la rationalisation [NDTR: streamlining] de ce procédé.


== PAGE UNDER CONSTRUCTION  ==  <!--
== Documentation et Metadata ==
 
 
== Documentation and Metadata ==


Before you share your command with the world, you should consider adding some attributions to the code:
Avant de partager votre commande avec le monde, vous devriez penser à ajouter quelques informations au code:


<pre>
<pre>
Line 190: Line 187:
</pre>
</pre>


And you should <em>definitely</em> add some documentation:
Et vous devriez <em>absolument</em> ajouter de la documentation:  


<pre>
<pre>
Line 199: Line 196:
   contributors: ["Atul Varma"],
   contributors: ["Atul Varma"],
   license: "MPL",
   license: "MPL",
   description: "Inserts today's date.",
   description: "Insère la date du jour.",
   help: "If you're in an editable text area, inserts today's date, formatted for the current locale.",
   help: "Insère la date du jour, formattée pour la locale actuelle, si vous êtes dans un champ de texte éditable.",
    
    
   /* THE REST OF THE CODE HERE */
   /* THE REST OF THE CODE HERE */
Line 206: Line 203:
</pre>
</pre>


The <code>.description</code> and <code>.help</code> attributes are both automatically displayed alongside your command's name on the command-list page(The user can get to this page at any time by issuing the "command-list" command.HTML tags can be used in both of these strings.
Les attributs <code>.description</code> et <code>.help</code> sont tous deux affichés automatiquement à la suite du nom de votre commande sur la page de liste des commandes (L'utilisateur peut se rendre à cette page à n'importe quel moment avec la commande "command-list"). Les tags HTML peuvent être utilisés dans ces 2 chaines.


Description is a one-line summary of what the command does, while Help is a longer description that can include examples, caveats, and so on. If your command is simple enough that all you have to say about it fits in one line, it's OK to use a description alone and leave out the help.
Description est un résumé d'une ligne de ce que la commande fait, alors que Help est une description plus longue qui peut inclure des examples, avertissements, etc. Si votre commande est suffisamment simple pour que tout ce que vous ayez à en dire rentre dans une ligne, c'est OK si vous utilisez juste Description et pas Help.


== Sharing it with the World ==
== Partager avec le monde entier ==


Now that we've got our awesome new "date" command, let's share it with the world. All you have to do is put it the javascript file on the web somewhere, and make an html page linking to it with "link rel".
Maintenant que l'on a notre super nouvelle commande "date", partageons là. Tout ce que vous avez à faire pour ça est de mettre le fichier javascript quelque part sur le web, et de faire un lien html vers celui ci avec "link rel".


  <pre><link rel="commands" href="http://path-to-js" name="Title Goes Here" /></pre>
<pre><link rel="commands" href="http://path-to-js" name="Title Goes Here" /></pre>


''Note: your webserver must serve .js files as 'application/x-javascript'. The mime-type 'text/javascript' is silently ignored.
''NB: Votre serveur web doit servir les fichier .js en temps que 'application/x-javascript'. Le type mime 'text/javascript' sera silencieusement ignoré.''
''


Anyone with Ubiquity who visits will get a message offering them the choice of subscribing to your command.
N'importe quel utilisateur d'Ubiquity qui visitera votre page recevra un message lui proposant de souscrire à votre commande.


[[Image:Subscribe.png]]
[[Image:Subscribe.png]]


If the user chooses to subscribe to a command from an untrusted source, they will get a security warning message before they can install the command.  (And in Ubiquity 0.1, ALL sources are considered untrusted, so don't take it personally!) Because Ubiquity commands can execute arbitrary javascript with chrome privileges, subscribing to a command from a website means allowing that site full access to do whatever it wants to your browser. We want to make sure people understand the dangers before subscribing to commands, so we made the warning page pretty scary.
Si l'utilisateur choisit de souscrire à une commande d'une source douteuse, il recevra un avertissement de sécurité avant de pouvoir installer la commande (et dans Ubiquity 0.1, TOUTES les sources sont considérées douteuses, donc ne le prenez pas pour vous!). Comme les commandes Ubiquity peuvent exécuter du javascript ave des privilèges chrome, souscrire à une commande d'un site web signifie autoriser ce site web à faire ce qu'il veut avec votre navigateur. Nous voulons être sûrs que les gens comprennent les dangers avant de souscrire à des commandes, donc l'avertissement est plutot inquiétant:
[[Image:Warning.PNG]]


[[Image:Warning.PNG]]
 
== PAGE UNDER CONSTRUCTION  ==  <!--


In the future, we're going to have something set up that we call a "trust network".  When you try out a Ubiquity command from a website, and determine that the command is safe (or unsafe), you'll be able to leave an approval (or a warning).  When your friends with Ubiquity installed visit the same site, they'll see the approval or the warning that you left.  In this way, users will be able to rely on the judgement of other people they already know and trust in order to help them make decisions about whether a command is safe to install or not.
In the future, we're going to have something set up that we call a "trust network".  When you try out a Ubiquity command from a website, and determine that the command is safe (or unsafe), you'll be able to leave an approval (or a warning).  When your friends with Ubiquity installed visit the same site, they'll see the approval or the warning that you left.  In this way, users will be able to rely on the judgement of other people they already know and trust in order to help them make decisions about whether a command is safe to install or not.
12

edits