aboutsummaryrefslogtreecommitdiffstats
path: root/langs/pt-br/contribute.po
diff options
context:
space:
mode:
authorfilip <filip.komar@gmail.com>2015-12-27 19:57:32 +0100
committerfilip <filip.komar@gmail.com>2015-12-27 19:57:32 +0100
commit8c970f0f12cff9db97b39250a056b450260f1aa7 (patch)
treeb03c614a043670a4895992b4d3a459f3a7476a6c /langs/pt-br/contribute.po
parent0e62faf5f6a8c8c87530e9e7594582f03633a0e3 (diff)
downloadwww-8c970f0f12cff9db97b39250a056b450260f1aa7.tar
www-8c970f0f12cff9db97b39250a056b450260f1aa7.tar.gz
www-8c970f0f12cff9db97b39250a056b450260f1aa7.tar.bz2
www-8c970f0f12cff9db97b39250a056b450260f1aa7.tar.xz
www-8c970f0f12cff9db97b39250a056b450260f1aa7.zip
improvement for en_GB and possibly other English dialects
Diffstat (limited to 'langs/pt-br/contribute.po')
0 files changed, 0 insertions, 0 deletions
> 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
package modules::parameters; # $Id$

use diagnostics;
use strict;

#-######################################################################################
#- misc imports
#-######################################################################################
use common;
use modules;


sub parameters {
  my ($module) = @_;

  if (!$::isStandalone && !$::testing) {
      modules::extract_modules('/tmp', $module);
      $module = "/tmp/$module.o";
  }

  my @parameters;
  foreach (common::join_lines(run_program::get_stdout('modinfo', '-p', $module))) {
      chomp;
      next if /^warning:/;
      (my $name, $_) = /(\S+)\s+(.*)/s or warn "modules::parameters::get_options_name($module): unknown line\n";

      my $c_types = 'int|string|short|byte|char|long';
      my ($is_a_number, $description, $min, $max) = (0, '', 1, 1);
      if (/^($c_types) array \(min = (\d+), max = (\d+)\),?\s*(.*)/s) {
	  $_ = $4;
	  #- seems like "char" are buggy entries
	  ($is_a_number, $min, $max) = ($1 ne 'string', $2, $3) if $1 ne 'char'; 
      } elsif (/^($c_types),?\s*(.*)/s) {
	  $_ = $2;
	  #- here "char" really are size-limited strings, modinfo doesn't display the size limit (but since we don't care about it, it doesn't matter :)
	  $is_a_number = $1 ne 'string' if $1 ne 'char';
      } else {
	  #- for things like "no format character" or "unknown format character"
      }
      if (/^description "(.*)",?\s*/s) {
	  ($description, $_) = ($1, $2);
      }
      #- print "STILL HAVE ($_)\n" if $_;

	 my $format = $min == 1 && $max == 1 ?
		($is_a_number ? N("a number") : '') :
		$min == $max ? 
		($is_a_number ? N("%d comma separated numbers", $min) : N("%d comma separated strings", $min)) :
		$min == 1 ?
		($is_a_number ? N("comma separated numbers") : N("comma separated strings")) :
		''; #- too weird and buggy, do not display it