Bugs:

  • - When we goto: administer >> localization we get an 'Page not found' message instead of some info/overview of this module like it should do;
    • - I added the following code to the 'conf.php'-file:
      $languages = array("nl" => "nederlands");
      

      and when i goto; administer >> localization >> nederlands I also get an 'Page not found'.

Features:
It would be nice and a + for usability if the locale.module determines if there is only one language inside $languages.
If there is only one language, it should not display the radiobuttons at translated/untranslated strings pages (administer >> localization >> $language >> translated strings || untranslated strings || search strings):

Language
o Any language
o All language
o Nederlands*

* == $language defined inside conf.php

Comments

Stefan Nagtegaal’s picture

Assigned: Unassigned » Stefan Nagtegaal
Stefan Nagtegaal’s picture

Patch for bugs and improvements are on it's way...

Stefan Nagtegaal’s picture

while fixing and improving this module it isn't very clear to me what the difference is between the first two options;

function locale_seek_form() {
  global $languages;
  $edit =& $_POST["edit"];
  $form .= form_textfield(t("Strings to search for"), "string", $edit["string"], 30, 30, t("Leave blank to show all strings."));
  $form .= form_radios(t("Language"), "language", ($edit["language"] ? $edit["language"] : keys($languages)), array_merge(array("any" => t("Any language"), "all" => t("All languages")), $languages), t("In which language must the string be translated/untranslated (see status)?"));
  $form .= form_radios(t("Status"), "status", $edit["status"], array(2 => t("Untranslated"), 1 => t("Translated"), 0 => t("All")));
  $form .= form_submit(t("Search"));

  $output .= form($form);

  return $output;
}

In this code we'll see that we can choose to translate the strings into "Any language", "All languages" and the rest of $languages.
Now tested this quite a few hours but it's a total question to mee what the difference is between translating the strings using "Any language" or "All languages" because they are doing exactly the same in my opinion..

Could someone please verify this, so I can remove these extra and unneeded options from the locale.module?

Stefan Nagtegaal’s picture

Well, it looks like you can choose to translate the strings into any language, but that isn't very usefull IMO because you can choose every language apart from another inside the same options-list..

Any thoughts about this?

Stefan Nagtegaal’s picture

StatusFileSize
new4.39 KB

I fixed the bugs and built-in the feature metioned above...

Patch attached...

dries’s picture

  1. In locale_help() you introduced a variable called $key: it does not seem to be defined anywhere?
  2. Why add a foreach loop to locale_seek_form() when there is only one hidden field to emit?

Please resubmit.

Stefan Nagtegaal’s picture

Attached patch should work okay...

Stefan Nagtegaal’s picture

Sorry, uploaded the wrong patch.. This is the right one without the help text. (Sorry, can't get the helptext displaying using the proposed regex's from Goba.)

dries’s picture

Priority: Critical » Normal

Committed to HEAD. Thanks.

Anonymous’s picture

This patch was only for usability and fixed most of the bugs..

1 bug is still there, which is that the help text isn't displayed on the 'locale/$key/translated' and 'locale/$key/untranslated' pages..

Goba had a way of dealing with this, with some reg_exp which I (unfortunatly) don't understand..

Goba, can you give this a try?

Stefan Nagtegaal’s picture

Assigned: Stefan Nagtegaal » Unassigned

While my knowledge of reg_exp's aren't at the level they (maybe) should be, i'll hope someone else can fix this..
AFAIK this is the only help-text which isn't displayed the way it should be...

jonbob’s picture