On Wed, 2010-04-14 at 07:38 +0000, Michael Nelson wrote: [snip] > Thanks Paul and Adi. And thanks Adi for the detailed MP with demo > steps :) > > Adi, when I click on the help text, it never finishes loading (as in > the spinner never disappears). Not sure why, but it certainly > disappears when I click on help text in other pages. I have no idea why the spinner is still there. Is there any documentation about how should I use the help popup? I only added "help" class to the link. Is there anything else I need to do? > The simple functionality works really well! Thanks for ensuring that > it works not just on page load, but also when the translation is > deleted and re-started. > > I've just got one small suggested behaviour change: I noticed that > you've added the js-action to the template itself... it may be that > this has been done elsewhere too, but if it's not a big change, it > would be great instead to progressively enhance the page to this > feature... that is: > > 1) If js is not switched on, then the template itself simply renders > the span with the default text "You are in blah mode" (and it won't be > a link etc.) I was not sure if LP interface is supposed to be used on browsers without JS. Done :) > 2) When the js on the page loads, it will add the "sprite edit > js-action" classes to the node (which changes the way it is > displayed), and as it does now, link the on click event, and update > the content to say "Enter ...". (BTW: is there any reason for the > widget-hd class you've got there currently? it's usually used for > widgets with header+body, like the slideout stuff). Done. I would like to removed the widget-hd class... but js-action class will not set the proper style. I looked in the CSS file and the css selector for js-action was ".widget-hd.js-action". This is why I added the widget-hd class. Without the widget-hd class, I will have to add some more code to the CSS file. This is the current style.css /* The js-action class is also used for non-links, for example, with * expand/collapse sections. */ .widget-hd.js-action {color: #093; cursor:pointer} .widget-hd.js-action:hover {text-decoration: underline;} > This will ensure that this aspect of the page will still make sense > when JS is not enabled (everything else on the page works in FF with > JS off as far as I can see). > > Marking as approved, but please consider the above suggestion. As a general rule, should we desing LP interface so that it can be used in browsers without CSS and Javascript? Here is the latest diff: === modified file 'lib/canonical/launchpad/javascript/translations/pofile.js' --- lib/canonical/launchpad/javascript/translations/pofile.js 2010-04-13 17:54:56 +0000 +++ lib/canonical/launchpad/javascript/translations/pofile.js 2010-04-15 16:05:26 +0000 @@ -92,6 +92,7 @@ }; var WORKING_MODE_SWITCH_ID = "#translation-switch-working-mode"; +var WORKING_MODE_SWITCH_HELP_ID = "#translation-switch-working-mode-help"; var WORKING_MODE_COOKIE = "translation-working-mode"; var WORKING_MODE_REVIEWER = "reviewer"; var WORKING_MODE_TRANSLATOR = "translator"; @@ -156,6 +157,15 @@ var working_mode_switch = Y.one(WORKING_MODE_SWITCH_ID); // Initialize only if user is a reviewer and the switch is on the page. if (working_mode_switch !== null) { + working_mode_switch.addClass("sprite edit js-action widget-hd"); + + var working_mode_switch_help = Y.one(WORKING_MODE_SWITCH_HELP_ID); + if (working_mode_switch_help !== null) { + var what_is_this = ( + '(' + + 'What\'s this?)'); + working_mode_switch_help.set("innerHTML", what_is_this); + } if (getWorkingMode() == WORKING_MODE_TRANSLATOR) { setTranslatorModeText(); } else { === modified file 'lib/lp/translations/help/working-modes.html' --- lib/lp/translations/help/working-modes.html 2010-04-13 16:06:52 +0000 +++ lib/lp/translations/help/working-modes.html 2010-04-15 15:34:42 +0000 @@ -9,42 +9,44 @@ href="/+icing/yui/current/build/cssbase/base.css" /> -

Translation working modes

- -

- When you have full access to translations, all your new translations - will be automatically applied as the new current translations. This is - the desire result when reviewing others translations or working in - small teams. Adding a new suggestion will require to explicitly check - the "Someone needs to review this translation" checkbox. -

- -

- When working in teams using a peer review process as a measurement - translations quality assurance, the previously described behaviour - is not suitable, as you will have to manually check the - "Someone needs to review this translation" checkbox after adding - each new translation. -

- -

- To deal with these different use cases, the following working modes - are available to persons with full access to translations: +

Switching between "translator" and "reviewer" modes

+ +

+ If you're making translations for a project that uses a Structured + or Restricted + permissions policy and you're a member of the + appropriate translation team + you can work in one of two modes:

+

How this affects team workflows

+ +

+ When you're reviewing translations made by other people, or you're + working in a small team, you usually want your translations to be applied + automatically. This is when you'd choose Reviewer mode. +

+ +

+ However, if you're working in a team that uses a peer review process + Translator mode will be more suitable as it holds each of your + translations as suggestions that should be reviewed by someone else. +

+

There's more help with translations in our help wiki. === modified file 'lib/lp/translations/stories/standalone/xx-translation-access-display.txt' --- lib/lp/translations/stories/standalone/xx-translation-access-display.txt 2010-04-13 17:54:56 +0000 +++ lib/lp/translations/stories/standalone/xx-translation-access-display.txt 2010-04-15 15:59:22 +0000 @@ -28,7 +28,7 @@ >>> print_tag_with_id( ... admin_browser.contents, ... 'translation-switch-working-mode') - Enter translator mode + You are in revier mode. == Displaying translation groups and reviewers == === modified file 'lib/lp/translations/templates/translations-macros.pt' --- lib/lp/translations/templates/translations-macros.pt 2010-04-13 17:54:56 +0000 +++ lib/lp/translations/templates/translations-macros.pt 2010-04-15 16:00:49 +0000 @@ -127,13 +127,10 @@ tal:condition="link/enabled" tal:content="structure link/render">

  • - - Enter translator mode + + You are in revier mode. - ( - What's this? - ) +
  • -- Adi Roiban