diff options
author | Dries Buytaert <dries@buytaert.net> | 2005-11-12 11:26:16 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2005-11-12 11:26:16 +0000 |
commit | aeed4cd8e4814bb0ed8ad06d581a95b82e2d718b (patch) | |
tree | 4a022207fea4b4d7a4a48a6ac20099c3b38e0629 /includes/locale.inc | |
parent | 64a617c208c02b6360d16d0960eebc67839d4dc8 (diff) | |
download | brdo-aeed4cd8e4814bb0ed8ad06d581a95b82e2d718b.tar.gz brdo-aeed4cd8e4814bb0ed8ad06d581a95b82e2d718b.tar.bz2 |
- Patch #35644 by webchick: forms API simplificiations.
Diffstat (limited to 'includes/locale.inc')
-rw-r--r-- | includes/locale.inc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/includes/locale.inc b/includes/locale.inc index 9c2a17aa0..5fef75885 100644 --- a/includes/locale.inc +++ b/includes/locale.inc @@ -100,7 +100,7 @@ function _locale_admin_manage_add_screen() { $form = array(); $form['header'] = array('#prefix' => '<h2>', '#value' => t('Custom language') , '#suffix' => '</h2>'); $form['langcode'] = array('#type' => 'textfield', '#title' => t('Language code'), '#default_value' => $edit['langcode'], '#size' => 12, '#maxlength' => 60, '#description' => t("Commonly this is an <a href=\"%iso-codes\">ISO 639 language code</a> with an optional country code for regional variants. Examples include 'en', 'en-US' and 'zh-cn'.", array('%iso-codes' => 'http://www.w3.org/WAI/ER/IG/ert/iso639.htm'))); - $form['langname'] = array('#type' => 'textfield', '#title' => t('Language name in English'), '#default_value' => $edit['langname'], '#size' => 60, '#maxlength' => 64, '#description' => t('Name of the language. Will be available for translation in all languages.')); + $form['langname'] = array('#type' => 'textfield', '#title' => t('Language name in English'), '#default_value' => $edit['langname'], '#maxlength' => 64, '#description' => t('Name of the language. Will be available for translation in all languages.')); $form['submit'] = array('#type' => 'submit', '#value' => t('Add custom language')); $output .= drupal_get_form('_locale_custom_language', $form); @@ -980,15 +980,15 @@ function _locale_string_edit($lid) { while ($translation = db_fetch_object($result)) { $orig = $translation->source; $form[$translation->locale] = (strlen($orig) > 40) ? - array('#type' => 'textarea', '#title' => $languages['name'][$translation->locale], '#default_value' => $translation->translation, '#cols' => 60, '#rows' => 15) - : array('#type' => 'textfield', '#title' => $languages['name'][$translation->locale], '#default_value' => $translation->translation, '#size' => 60, '#maxlength' => 128); + array('#type' => 'textarea', '#title' => $languages['name'][$translation->locale], '#default_value' => $translation->translation, '#rows' => 15) + : array('#type' => 'textfield', '#title' => $languages['name'][$translation->locale], '#default_value' => $translation->translation); unset($languages['name'][$translation->locale]); } $form['item'] = array('#type' => 'item', '#title' => t('Original text'), '#value' => wordwrap(check_plain($orig, 0))); foreach ($languages['name'] as $key => $lang) { $form[$key] = (strlen($orig) > 40) ? -array('#type' => 'textarea', '#title' => $lang, '#cols' => 60, '#rows' => 15) : -array('#type' => 'textfield', '#title' => $lang, '#size' => 60, '#maxlength' => 128); +array('#type' => 'textarea', '#title' => $lang, '#rows' => 15) : +array('#type' => 'textfield', '#title' => $lang); } $form['submit'] = array('#type' => 'submit', '#value' => t('Save translations')); |