~ubuntu-branches/ubuntu/trusty/yelp-xsl/trusty

« back to all changes in this revision

Viewing changes to xslt/common/l10n.xsl

  • Committer: Package Import Robot
  • Author(s): Simon McVittie
  • Date: 2012-10-22 22:14:09 UTC
  • mfrom: (1.3.3)
  • mto: (11.1.3 experimental)
  • mto: This revision was merged to the branch mainline in revision 18.
  • Revision ID: package-import@ubuntu.com-20121022221409-563yhrggjvqtt7yc
Tags: upstream-3.6.1
ImportĀ upstreamĀ versionĀ 3.6.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
366
366
Extracts he plural form string for a given cardinality
367
367
$number: The cardinality of the plural form
368
368
$lang: The locale to use when looking up the translated string
369
 
$lang_language: The language portion of the ${lang}
370
 
$lang_region: The region portion of ${lang}
371
 
$lang_variant: The variant portion of ${lang}
372
 
$lang_charset: The charset portion of ${lang}
373
369
 
374
370
REMARK: Lots of documentation is needed
375
371
-->
431
427
    </xsl:when>
432
428
 
433
429
    <!-- == cy == -->
434
 
    <xsl:when test="$lang_language = 'cy'">
 
430
    <xsl:when test="starts-with($normlang, 'cy-')">
435
431
      <xsl:choose>
436
432
        <xsl:when test="$number != 2">
437
433
          <xsl:text>0</xsl:text>
443
439
    </xsl:when>
444
440
 
445
441
    <!-- == fa hu ja ko th tr vi zh == -->
446
 
    <xsl:when test="($lang_language = 'fa') or ($lang_language = 'hu') or
447
 
                    ($lang_language = 'ja') or ($lang_language = 'ko') or
448
 
                    ($lang_language = 'th') or ($lang_language = 'tr') or
449
 
                    ($lang_language = 'vi') or ($lang_language = 'zh') ">
 
442
    <xsl:when test="starts-with($normlang, 'ja-') or starts-with($normlang, 'ko-') or
 
443
                    starts-with($normlang, 'th-') or starts-with($normlang, 'tr-') or
 
444
                    starts-with($normlang, 'vi-') or starts-with($normlang, 'zh-') ">
450
445
      <xsl:text>0</xsl:text>
451
446
    </xsl:when>
452
447
 
453
448
    <!-- == fr nso wa == -->
454
 
    <xsl:when test="($lang_language = 'fr') or ($lang_language = 'nso') or
455
 
                    ($lang_language = 'wa') ">
 
449
    <xsl:when test="starts-with($normlang, 'fr-') or starts-with($normlang, 'nso-') or
 
450
                    starts-with($normlang, 'wa-') ">
456
451
      <xsl:choose>
457
452
        <xsl:when test="$number &gt; 1">
458
453
          <xsl:text>1</xsl:text>
464
459
    </xsl:when>
465
460
 
466
461
    <!-- == ga == -->
467
 
    <xsl:when test="$lang_language = 'ga'">
 
462
    <xsl:when test="starts-with($normlang, 'ga-')">
468
463
      <xsl:choose>
469
464
        <xsl:when test="$number = 1">
470
465
          <xsl:text>0</xsl:text>
479
474
    </xsl:when>
480
475
 
481
476
    <!-- == sk == -->
482
 
    <xsl:when test="$lang_language = 'sk'">
 
477
    <xsl:when test="starts-with($normlang, 'sk-')">
483
478
      <xsl:choose>
484
479
        <xsl:when test="$number = 1">
485
480
          <xsl:text>0</xsl:text>
494
489
    </xsl:when>
495
490
 
496
491
    <!-- == sl == -->
497
 
    <xsl:when test="$lang_language = 'sl'">
 
492
    <xsl:when test="starts-with($normlang, 'sl-')">
498
493
      <xsl:choose>
499
494
        <xsl:when test="$number mod 100 = 1">
500
495
          <xsl:text>0</xsl:text>