Permalink
Browse files

more styling and option fixes

  • Loading branch information...
splitbrain committed Dec 10, 2010
1 parent 04971ee commit c730e7dd40be41b770bdf3528d60a4b1dd635c1d
Showing with 22 additions and 57 deletions.
  1. +4 −8 conf/default.php
  2. +2 −6 conf/metadata.php
  3. +5 −4 helper.php
  4. +2 −4 lang/en/settings.php
  5. +9 −35 style.css
View
@@ -9,13 +9,9 @@
$conf['translationns'] = '';
$conf['skiptrans'] = '';
$conf['dropdown'] = 0;
-$conf['dropdown2'] = 1; // 1 = show flag or country code near combobox
-$conf['flags'] = 1; // 0 = Do not show flags.
-$conf['description'] = 0; // 0 = Do not show text 'Translations of this page'.
-$conf['blankflag'] = 1; // 0 = Show text instead of blank image if flag image does not exist; 1 = show blank flag image.
-$conf['translateui'] = 1;
-$conf['redirectstart'] = 1;
+$conf['translateui'] = 0;
+$conf['redirectstart'] = 0;
$conf['checkage'] = 0;
$conf['about'] = '';
-$conf['localabout'] = 1;
-$conf['display'] = 'lc, title';
+$conf['localabout'] = 0;
+$conf['display'] = 'langcode,title';
View
@@ -9,16 +9,12 @@
$meta['translationns'] = array('string','_pattern' => '/^(|[\w:\-]+)$/');
$meta['skiptrans'] = array('string');
$meta['dropdown'] = array('onoff');
-$meta['dropdown2'] = array('onoff');
-$meta['flags'] = array('onoff');
-$meta['description'] = array('onoff');
-$meta['blankflag'] = array('onoff');
+$meta['display'] = array('multicheckbox',
+ '_choices' => array('langcode','name','flag','title','twolines'));
$meta['translateui'] = array('onoff');
$meta['redirectstart'] = array('onoff');
$meta['checkage'] = array('onoff');
$meta['about'] = array('string','_pattern' => '/^(|[\w:\-]+)$/');
$meta['localabout'] = array('onoff');
-$meta['display'] = array('multicheckbox',
- '_choices' => array('lc','name','flag','title'));
View
@@ -176,10 +176,11 @@ function showTranslations(){
$out = '<div class="plugin_translation">';
//show title and about
- if ($this->getConf('description')){
+ if (isset($this->opts['title'])){
$out .= '<span>'.$this->getLang('translations');
if ($this->getConf('about')) $out .= $this->showAbout();
$out .= ':</span> ';
+ if(isset($this->opts['twolines'])) $out .= '<br />';
}
// open wrapper
@@ -215,7 +216,7 @@ function showTranslations(){
}
// show about if not already shown
- if (!$this->getConf('description') && $this->getConf('about')) {
+ if (!isset($this->opts['title']) && $this->getConf('about')) {
$out .= '&nbsp';
$out .= $this->showAbout();
}
@@ -272,8 +273,8 @@ function getTransItem($lc, $idpart) {
// what to display as name
if(isset($this->opts['name'])){
$display = hsc($localname);
- if(isset($this->opts['lc'])) $display .= ' ('.hsc($lang).')';
- }elseif(isset($this->opts['lc'])){
+ if(isset($this->opts['langcode'])) $display .= ' ('.hsc($lang).')';
+ }elseif(isset($this->opts['langcode'])){
$display = hsc($lang);
}else{
$display = '&nbsp;';
View
@@ -9,12 +9,10 @@
$lang['translationns'] = 'If you only want translations below a certain namespace, put it here.';
$lang['skiptrans'] = 'When the pagename matches this regular expression, don\'t show the translation menu.';
$lang['dropdown'] = 'Use a dropdown list to display the translations (recommended for more than 5 languages).';
-$lang['dropdown2'] = 'When use dropdown list display country code or flag near combobox.';
-$lang['flags'] = 'Use flags on screen instead of ISO language two letter code? If dropdown list is on show only current language flag.';
-$lang['description'] = 'Display text like "Translations of this page" in current language.';
-$lang['blankflag'] = 'Display blank image if flag not exist (instead of text).';
$lang['translateui'] = 'Should the language of the user interface be switched in foreign language namespaces, too?';
$lang['redirectstart'] = 'Should the start page automatically redirect into a language namespace using browser language detection?';
$lang['about'] = 'Enter a pagename here where the translation feature is explained for your users. It will be linked from the language selector.';
$lang['localabout'] = 'Use localized versions of about page (instead of one global about page).';
$lang['checkage'] = 'Warn about possibly outdated translations.';
+$lang['display'] = 'Select what you\'d like to have shown in the language selector. Note that using country flags for language selection is not recommended by usability experts.';
+
View
@@ -3,6 +3,7 @@
font-size: 95%;
padding-right: 0.1em;
margin : 0.0em 0 0.3em 0;
+ text-align: right;
}
/* List */
@@ -11,12 +12,15 @@
padding: 0;
margin: 0;
}
-.dokuwiki div.plugin_translation ul li{
+.dokuwiki div.plugin_translation ul li {
float: left;
list-style-type: none;
padding: 0;
margin: 0.2em 0 0 0;
}
+.dokuwiki div.plugin_translation ul li img {
+ margin: -0.1em 0.2em;
+}
.dokuwiki div.plugin_translation ul li a.wikilink1:link,
.dokuwiki div.plugin_translation ul li a.wikilink1:hover,
@@ -42,6 +46,7 @@
border: none !important;
}
+
/* Dropdown */
.dokuwiki div.plugin_translation select,
@@ -68,39 +73,8 @@
text-align: center;
}
-
-
-/******************************************************************************
- * Flags
- *****************************************************************************/
-
-
-/*
-.dokuwiki div.plugin_translation ul li a img {
- opacity: 0.80;
- border: 1px solid #888888;
- margin-top: 0em;
-}
-.dokuwiki div.plugin_translation ul li div.flag_not_exists a img {
- opacity: 0.25;
- border: 1px solid #666666;
-}
-
-.dokuwiki div.plugin_translation ul li a.wikilink2 img {
-}
-.dokuwiki div.plugin_translation span.curid a img {
- opacity: 1.0;
- border: 1px solid #666666;
-}
-.dokuwiki div.plugin_translation ul li a:hover img {
- opacity: 1.0;
- border: 1px solid #444444;
-}
-
-.dokuwiki div.plugin_translation ul li div.flag_not_exists a:hover img {
+/* flags for non-existing pages */
+.dokuwiki div.plugin_translation img.wikilink2,
+.dokuwiki div.plugin_translation .wikilink2 img {
opacity: 0.5;
- border: 1px solid #444444;
}
-*/
-
-

0 comments on commit c730e7d

Please sign in to comment.