~ubuntu-branches/ubuntu/trusty/zonecheck/trusty

« back to all changes in this revision

Viewing changes to .pc/20locale-rb.dpatch/zc/locale.rb

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Delafond
  • Date: 2010-07-08 12:55:39 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20100708125539-gazuzu1eb58l3tot
Tags: 3.0.2-1
* New upstream release (Closes: #587419).
* Updated watch file.
* Bumped up Standards revision.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# $Id: locale.rb,v 1.4 2010/06/07 08:51:25 chabannf Exp $
 
1
# $Id: locale.rb,v 1.5 2010/06/29 12:08:35 chabannf Exp $
2
2
 
3
3
4
4
# CONTACT     : zonecheck@nic.fr
5
5
# AUTHOR      : Stephane D'Alu <sdalu@nic.fr>
6
6
#
7
7
# CREATED     : 2003/08/29 14:10:22
8
 
# REVISION    : $Revision: 1.4 $ 
9
 
# DATE        : $Date: 2010/06/07 08:51:25 $
 
8
# REVISION    : $Revision: 1.5 $ 
 
9
# DATE        : $Date: 2010/06/29 12:08:35 $
10
10
#
11
11
# CONTRIBUTORS: (see also CREDITS file)
12
12
#
73
73
 
74
74
      if ENV['LANG']
75
75
        lng = ENV['LANG'] 
76
 
        ln, ct, en = Locale::splitlang(Locale::normlang(lng))
 
76
        ln, ct, en = ZoneCheck::Locale::splitlang(ZoneCheck::Locale::normlang(lng))
77
77
        evlist = []
78
78
        evlist << 'lang'  if (@language != ln) || (@country != ct)
79
79
        evlist << 'encoding'  if (@encoding != en)
86
86
    attr_reader :lang, :language, :country, :encoding
87
87
 
88
88
    def lang=(lng)
89
 
      ln, ct, en = Locale::splitlang(Locale::normlang(lng))
 
89
      ln, ct, en = ZoneCheck::Locale::splitlang(ZoneCheck::Locale::normlang(lng))
90
90
      if($supported_languages.include?(ln.downcase))
91
91
        evlist = []
92
92
        evlist << 'lang'        if (@language != ln) || (@country != ct)