From f4bbfe9c7b359e4c831e61482e952fb66de85e1a Mon Sep 17 00:00:00 2001 From: David Swan Date: Tue, 16 Mar 2021 14:11:30 +0000 Subject: [PATCH] (IAC-1497) - Removal of unsupported `translate` dependency --- .fixtures.yml | 2 - locales/config.yaml | 26 ----- locales/ja/puppetlabs-apt.po | 155 ------------------------------ locales/puppetlabs-apt.pot | 177 ----------------------------------- manifests/backports.pp | 4 +- manifests/conf.pp | 2 +- manifests/init.pp | 2 +- manifests/key.pp | 6 +- manifests/params.pp | 4 +- manifests/pin.pp | 6 +- manifests/ppa.pp | 4 +- manifests/setting.pp | 8 +- manifests/source.pp | 8 +- metadata.json | 4 - 14 files changed, 22 insertions(+), 386 deletions(-) delete mode 100644 locales/config.yaml delete mode 100644 locales/ja/puppetlabs-apt.po delete mode 100644 locales/puppetlabs-apt.pot diff --git a/.fixtures.yml b/.fixtures.yml index 2d55ecf65e..0157d6ac2e 100644 --- a/.fixtures.yml +++ b/.fixtures.yml @@ -2,8 +2,6 @@ fixtures: repositories: "stdlib": "repo": "https://github.com/puppetlabs/puppetlabs-stdlib.git" - "translate": - "repo": "https://github.com/puppetlabs/puppetlabs-translate" facts: 'https://github.com/puppetlabs/puppetlabs-facts.git' puppet_agent: 'https://github.com/puppetlabs/puppetlabs-puppet_agent.git' provision: 'https://github.com/puppetlabs/provision.git' diff --git a/locales/config.yaml b/locales/config.yaml deleted file mode 100644 index 3f64263218..0000000000 --- a/locales/config.yaml +++ /dev/null @@ -1,26 +0,0 @@ ---- -# This is the project-specific configuration file for setting up -# fast_gettext for your project. -gettext: - # This is used for the name of the .pot and .po files; they will be - # called .pot? - project_name: puppetlabs-apt - # This is used in comments in the .pot and .po files to indicate what - # project the files belong to and should bea little more desctiptive than - # - package_name: puppetlabs-apt - # The locale that the default messages in the .pot file are in - default_locale: en - # The email used for sending bug reports. - bugs_address: docs@puppet.com - # The holder of the copyright. - copyright_holder: Puppet, Inc. - # This determines which comments in code should be eligible for translation. - # Any comments that start with this string will be externalized. (Leave - # empty to include all.) - comments_tag: TRANSLATOR - # Patterns for +Dir.glob+ used to find all files that might contain - # translatable content, relative to the project root directory - source_files: - - './lib/**/*.rb' - diff --git a/locales/ja/puppetlabs-apt.po b/locales/ja/puppetlabs-apt.po deleted file mode 100644 index 1fe9d1d840..0000000000 --- a/locales/ja/puppetlabs-apt.po +++ /dev/null @@ -1,155 +0,0 @@ -# #-#-#-#-# puppetlabs-apt.pot (puppetlabs-apt 6.0.0-27-gbb0f842) #-#-#-#-# -# SOME DESCRIPTIVE TITLE. -# Copyright (C) 2018 Puppet, Inc. -# This file is distributed under the same license as the puppetlabs-apt package. -# FIRST AUTHOR , 2018. -# -# #-#-#-#-# puppetlabs-apt_metadata.pot (PACKAGE VERSION) #-#-#-#-# -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-09-21T09:17:39+01:00\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: Eriko Kashiwagi , 2018\n" -"Language-Team: Japanese (Japan) (https://www.transifex.com/puppet/teams/41915/ja_JP/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: ja_JP\n" -"Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Translate Toolkit 2.0.0\n" - -#. ./manifests/backports.pp:69 -msgid "" -"If not on Debian or Ubuntu, you must explicitly pass location, release, " -"repos, and key" -msgstr "DebianまたはUbuntu以外の場合、場所、リリース、リポジトリ、およびキーを明示的に渡す必要があります。" - -#. ./manifests/backports.pp:95 -msgid "pin must be either a string, number or hash" -msgstr "pinは、文字列、数値またはハッシュのいずれかである必要があります。" - -#. ./manifests/conf.pp:25 -msgid "Need to pass in content parameter" -msgstr "contentパラメータを渡す必要があります。" - -#. ./manifests/init.pp:143 ./manifests/params.pp:8 -msgid "This module only works on Debian or derivatives like Ubuntu" -msgstr "本モジュールは、DebianまたはUbuntuなどの派生OSでのみ動作します。" - -#. ./manifests/key.pp:47 -msgid "key with id %{_id} already ensured as absent" -msgstr "id %{_id}のキーは、存在しないことが既に確認されています。" - -#. ./manifests/key.pp:81 -msgid "key with id %{_id} already ensured as present" -msgstr "id %{_id}のキーは、存在することが既に確認されています。" - -#. ./manifests/key.pp:97 -msgid "Invalid 'ensure' value '%{_ensure}' for apt::key" -msgstr "apt::keyの'%{_ensure}'の'ensure'の値が無効です。" - -#. ./manifests/params.pp:100 -msgid "Unable to determine value for fact os[\"name\"]" -msgstr "fact os[\"name\"]の値を特定できません。" - -#. ./manifests/pin.pp:84 -msgid "parameters release, origin, and version are mutually exclusive" -msgstr "パラメータrelease、origin、versionは相互に排他的です。" - -#. ./manifests/pin.pp:88 -msgid "parameter version cannot be used in general form" -msgstr "パラメータのバージョンは、一般的な形式では使用できません" - -#. ./manifests/pin.pp:91 -msgid "parameters release and origin are mutually exclusive" -msgstr "パラメータreleaseとoriginは相互に排他的です。" - -#. ./manifests/ppa.pp:30 ./manifests/source.pp:79 -msgid "os.distro.codename fact not available: release parameter required" -msgstr "os.distro.codenameのfactが使用できません。releaseパラメータが必要です。" - -#. ./manifests/ppa.pp:34 -msgid "apt::ppa is not currently supported on Debian." -msgstr "apt::ppaは、現在Debianではサポートされていません。" - -#. ./manifests/setting.pp:31 -msgid "apt::setting cannot have both content and source" -msgstr "apt::settingがcontentとsourceの両方を持つことはできません。" - -#. ./manifests/setting.pp:35 -msgid "apt::setting needs either of content or source" -msgstr "apt::settingには、contentまたはsourceのいずれかが必要です。" - -#. ./manifests/setting.pp:43 -msgid "" -"apt::setting resource name/title must start with either 'conf-', 'pref-' or " -"'list-'" -msgstr "apt::settingのリソース名/タイトルの先頭は、'conf-'、'pref-'、'list-'にする必要があります。" - -#. ./manifests/setting.pp:49 -msgid "apt::setting priority must be an integer or a zero-padded integer" -msgstr "apt::settingのpriorityは、整数またはゼロパディングされた整数にする必要があります。" - -#. ./manifests/source.pp:87 -msgid "cannot create a source entry without specifying a location" -msgstr "場所を指定せずにソースエントリを作成することはできません。" - -#. ./manifests/source.pp:101 -msgid "key hash must contain at least an id entry" -msgstr "キーハッシュには、少なくともidエントリを含める必要があります。" - -#. ./manifests/source.pp:140 -msgid "Received invalid value for pin parameter" -msgstr "pinパラメータに無効な値を受信しました。" - -#: ../lib/puppet/provider/apt_key/apt_key.rb:124 -msgid "The file %{_value} does not exist" -msgstr "ファイル%{_value}が存在しません。" - -#: ../lib/puppet/provider/apt_key/apt_key.rb:144 -msgid "%{_e} for %{_resource}" -msgstr "%{_resource}の%{_e}" - -#: ../lib/puppet/provider/apt_key/apt_key.rb:146 -msgid "could not resolve %{_resource}" -msgstr "%{_resource}を解決できませんでした。" - -#: ../lib/puppet/provider/apt_key/apt_key.rb:173 -msgid "" -"The id in your manifest %{_resource} and the fingerprint from content/source" -" don't match. Check for an error in the id and content/source is legitimate." -msgstr "" -"マニフェスト%{_resource}に含まれるidと、content/sourceのフィンガープリントが一致しません。idに間違いがないか、content/sourceが正当であるかを確認してください。" - -#: ../lib/puppet/provider/apt_key/apt_key.rb:191 -#: ../lib/puppet/provider/apt_key/apt_key.rb:227 -msgid "" -"an unexpected condition occurred while trying to add the key: %{_resource}" -msgstr "キー%{_resource}の追加中に、予期しない状況が発生しました。" - -#: ../lib/puppet/provider/apt_key/apt_key.rb:243 -msgid "This is a read-only property." -msgstr "これは、読み込み専用のプロパティです。" - -#: ../lib/puppet/type/apt_key.rb:27 -msgid "ensure => absent and refresh => true are mutually exclusive" -msgstr "ensure => absentとrefresh => trueは相互に排他的です。" - -#: ../lib/puppet/type/apt_key.rb:30 -msgid "The properties content and source are mutually exclusive." -msgstr "プロパティcontentとsourceは相互に排他的です。 are mutually exclusive." - -#: ../lib/puppet/type/apt_key.rb:33 -msgid "The id should be a full fingerprint (40 characters), see README." -msgstr "idは完全なフィンガープリント(40文字)である必要があります。READMEを参照してください。" - -#. metadata.json -#: .summary -msgid "" -"Provides an interface for managing Apt source, key, and definitions with " -"Puppet" -msgstr "Aptソース、キー、および定義をPuppetで管理するためのインターフェースを提供します。" diff --git a/locales/puppetlabs-apt.pot b/locales/puppetlabs-apt.pot deleted file mode 100644 index 5fa70e28e9..0000000000 --- a/locales/puppetlabs-apt.pot +++ /dev/null @@ -1,177 +0,0 @@ -# #-#-#-#-# puppetlabs-apt.pot (puppetlabs-apt 6.0.0-27-gbb0f842) #-#-#-#-# -# SOME DESCRIPTIVE TITLE. -# Copyright (C) 2018 Puppet, Inc. -# This file is distributed under the same license as the puppetlabs-apt package. -# FIRST AUTHOR , 2018. -# -# #-#-#-#-# puppetlabs-apt_metadata.pot (PACKAGE VERSION) #-#-#-#-# -# -#, fuzzy -msgid "" -msgstr "" -"#-#-#-#-# puppet.pot (PACKAGE VERSION) #-#-#-#-#\n" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-09-21 09:17:33 +0100\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Translate Toolkit 2.0.0\n" -"#-#-#-#-# puppetlabs-apt.pot (puppetlabs-apt 6.0.0-27-gbb0f842) #-#-#-#-#\n" -"Project-Id-Version: puppetlabs-apt 6.0.0-27-gbb0f842\n" -"\n" -"Report-Msgid-Bugs-To: docs@puppet.com\n" -"POT-Creation-Date: 2018-09-21 09:27+0100\n" -"PO-Revision-Date: 2018-09-21 09:27+0100\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" -"#-#-#-#-# puppetlabs-apt_metadata.pot (PACKAGE VERSION) #-#-#-#-#\n" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To:\n" -"POT-Creation-Date: 2018-09-21T09:17:39+01:00\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Translate Toolkit 2.0.0\n" - -#. ./manifests/backports.pp:69 -msgid "" -"If not on Debian or Ubuntu, you must explicitly pass location, release, " -"repos, and key" -msgstr "" - -#. ./manifests/backports.pp:95 -msgid "pin must be either a string, number or hash" -msgstr "" - -#. ./manifests/conf.pp:25 -msgid "Need to pass in content parameter" -msgstr "" - -#. ./manifests/init.pp:143 ./manifests/params.pp:8 -msgid "This module only works on Debian or derivatives like Ubuntu" -msgstr "" - -#. ./manifests/key.pp:47 -msgid "key with id %{_id} already ensured as absent" -msgstr "" - -#. ./manifests/key.pp:81 -msgid "key with id %{_id} already ensured as present" -msgstr "" - -#. ./manifests/key.pp:97 -msgid "Invalid 'ensure' value '%{_ensure}' for apt::key" -msgstr "" - -#. ./manifests/params.pp:100 -msgid "Unable to determine value for fact os[\"name\"]" -msgstr "" - -#. ./manifests/pin.pp:84 -msgid "parameters release, origin, and version are mutually exclusive" -msgstr "" - -#. ./manifests/pin.pp:88 -msgid "parameter version cannot be used in general form" -msgstr "" - -#. ./manifests/pin.pp:91 -msgid "parameters release and origin are mutually exclusive" -msgstr "" - -#. ./manifests/ppa.pp:30 ./manifests/source.pp:79 -msgid "os.distro.codename fact not available: release parameter required" -msgstr "" - -#. ./manifests/ppa.pp:34 -msgid "apt::ppa is not currently supported on Debian." -msgstr "" - -#. ./manifests/setting.pp:31 -msgid "apt::setting cannot have both content and source" -msgstr "" - -#. ./manifests/setting.pp:35 -msgid "apt::setting needs either of content or source" -msgstr "" - -#. ./manifests/setting.pp:43 -msgid "" -"apt::setting resource name/title must start with either 'conf-', 'pref-' or " -"'list-'" -msgstr "" - -#. ./manifests/setting.pp:49 -msgid "apt::setting priority must be an integer or a zero-padded integer" -msgstr "" - -#. ./manifests/source.pp:87 -msgid "cannot create a source entry without specifying a location" -msgstr "" - -#. ./manifests/source.pp:101 -msgid "key hash must contain at least an id entry" -msgstr "" - -#. ./manifests/source.pp:140 -msgid "Received invalid value for pin parameter" -msgstr "" - -#: ../lib/puppet/provider/apt_key/apt_key.rb:124 -msgid "The file %{_value} does not exist" -msgstr "" - -#: ../lib/puppet/provider/apt_key/apt_key.rb:144 -msgid "%{_e} for %{_resource}" -msgstr "" - -#: ../lib/puppet/provider/apt_key/apt_key.rb:146 -msgid "could not resolve %{_resource}" -msgstr "" - -#: ../lib/puppet/provider/apt_key/apt_key.rb:173 -msgid "" -"The id in your manifest %{_resource} and the fingerprint from content/source " -"don't match. Check for an error in the id and content/source is legitimate." -msgstr "" - -#: ../lib/puppet/provider/apt_key/apt_key.rb:191 -#: ../lib/puppet/provider/apt_key/apt_key.rb:227 -msgid "" -"an unexpected condition occurred while trying to add the key: %{_resource}" -msgstr "" - -#: ../lib/puppet/provider/apt_key/apt_key.rb:243 -msgid "This is a read-only property." -msgstr "" - -#: ../lib/puppet/type/apt_key.rb:27 -msgid "ensure => absent and refresh => true are mutually exclusive" -msgstr "" - -#: ../lib/puppet/type/apt_key.rb:30 -msgid "The properties content and source are mutually exclusive." -msgstr "" - -#: ../lib/puppet/type/apt_key.rb:33 -msgid "The id should be a full fingerprint (40 characters), see README." -msgstr "" - -#. metadata.json -#: .summary -msgid "" -"Provides an interface for managing Apt source, key, and definitions with " -"Puppet" -msgstr "" diff --git a/manifests/backports.pp b/manifests/backports.pp index 5949905c5e..39e6f6c0d8 100644 --- a/manifests/backports.pp +++ b/manifests/backports.pp @@ -72,7 +72,7 @@ } if (!($facts['os']['name'] == 'Debian' or $facts['os']['name'] == 'Ubuntu')) { unless $location and $release and $repos and $key { - fail(translate('If not on Debian or Ubuntu, you must explicitly pass location, release, repos, and key')) + fail('If not on Debian or Ubuntu, you must explicitly pass location, release, repos, and key') } } unless $location { @@ -98,7 +98,7 @@ 'release' => $_release, } } else { - fail(translate('pin must be either a string, number or hash')) + fail('pin must be either a string, number or hash') } apt::source { 'backports': diff --git a/manifests/conf.pp b/manifests/conf.pp index 9c1a59e81c..c27f0c1c0d 100644 --- a/manifests/conf.pp +++ b/manifests/conf.pp @@ -22,7 +22,7 @@ unless $ensure == 'absent' { unless $content { - fail(translate('Need to pass in content parameter')) + fail('Need to pass in content parameter') } } diff --git a/manifests/init.pp b/manifests/init.pp index a20748f436..3c96de81d1 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -158,7 +158,7 @@ ) inherits apt::params { if $facts['os']['family'] != 'Debian' { - fail(translate('This module only works on Debian or derivatives like Ubuntu')) + fail('This module only works on Debian or derivatives like Ubuntu') } if $update['frequency'] { diff --git a/manifests/key.pp b/manifests/key.pp index 87fe4e34c1..6c7d90efe4 100644 --- a/manifests/key.pp +++ b/manifests/key.pp @@ -48,7 +48,7 @@ case $ensure { /^(refreshed|present)$/: { if defined(Anchor["apt_key ${id} absent"]){ - fail(translate('key with id %{_id} already ensured as absent'), {'_id' => id}) + fail("key with id ${id} already ensured as absent") } if !defined(Anchor["apt_key ${id} present"]) { @@ -83,7 +83,7 @@ absent: { if defined(Anchor["apt_key ${id} present"]){ - fail(translate('key with id %{_id} already ensured as present', {'_id' => id})) + fail('key with id %{_id} already ensured as present', {'_id' => id}) } if !defined(Anchor["apt_key ${id} absent"]){ @@ -100,7 +100,7 @@ } default: { - fail translate('Invalid \'ensure\' value \'%{_ensure}\' for apt::key', {'_ensure' => ensure}) + fail("Invalid \'ensure\' value \'${_ensure}\' for apt::key") } } } diff --git a/manifests/params.pp b/manifests/params.pp index 9a9257702a..6167ea505d 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -5,7 +5,7 @@ class apt::params { if $facts['os']['family'] != 'Debian' { - fail(translate('This module only works on Debian or derivatives like Ubuntu')) + fail('This module only works on Debian or derivatives like Ubuntu') } $root = '/etc/apt' @@ -112,7 +112,7 @@ } } undef: { - fail(translate('Unable to determine value for fact os[\"name\"]')) + fail('Unable to determine value for fact os[\"name\"]') } default: { $ppa_options = undef diff --git a/manifests/pin.pp b/manifests/pin.pp index 8145b7d4b6..9310653b2d 100644 --- a/manifests/pin.pp +++ b/manifests/pin.pp @@ -81,14 +81,14 @@ if $packages_string != '*' { # specific form if ( $pin_release != '' and ( $origin != '' or $version != '' )) or ( $version != '' and ( $pin_release != '' or $origin != '' )) { - fail(translate('parameters release, origin, and version are mutually exclusive')) + fail('parameters release, origin, and version are mutually exclusive') } } else { # general form if $version != '' { - fail(translate('parameter version cannot be used in general form')) + fail('parameter version cannot be used in general form') } if ( $pin_release != '' and $origin != '' ) { - fail(translate('parameters release and origin are mutually exclusive')) + fail('parameters release and origin are mutually exclusive') } } diff --git a/manifests/ppa.pp b/manifests/ppa.pp index 6a874ce3dc..311f81df0e 100644 --- a/manifests/ppa.pp +++ b/manifests/ppa.pp @@ -32,11 +32,11 @@ Boolean $package_manage = false, ) { unless $release { - fail(translate('os.distro.codename fact not available: release parameter required')) + fail('os.distro.codename fact not available: release parameter required') } if $dist == 'Debian' { - fail(translate('apt::ppa is not currently supported on Debian.')) + fail('apt::ppa is not currently supported on Debian.') } if versioncmp($facts['os']['release']['full'], '14.10') >= 0 { diff --git a/manifests/setting.pp b/manifests/setting.pp index 16124c31f5..6757f61226 100644 --- a/manifests/setting.pp +++ b/manifests/setting.pp @@ -28,11 +28,11 @@ ) { if $content and $source { - fail(translate('apt::setting cannot have both content and source')) + fail('apt::setting cannot have both content and source') } if !$content and !$source { - fail(translate('apt::setting needs either of content or source')) + fail('apt::setting needs either of content or source') } $title_array = split($title, '-') @@ -40,13 +40,13 @@ $base_name = join(delete_at($title_array, 0), '-') assert_type(Pattern[/\Aconf\z/, /\Apref\z/, /\Alist\z/], $setting_type) |$a, $b| { - fail(translate("apt::setting resource name/title must start with either 'conf-', 'pref-' or 'list-'")) + fail("apt::setting resource name/title must start with either 'conf-', 'pref-' or 'list-'") } if $priority !~ Integer { # need this to allow zero-padded priority. assert_type(Pattern[/^\d+$/], $priority) |$a, $b| { - fail(translate('apt::setting priority must be an integer or a zero-padded integer')) + fail('apt::setting priority must be an integer or a zero-padded integer') } } diff --git a/manifests/source.pp b/manifests/source.pp index 2c3d4b84cb..bc4675b789 100644 --- a/manifests/source.pp +++ b/manifests/source.pp @@ -76,7 +76,7 @@ if $facts['os']['distro']['codename'] { $_release = $facts['os']['distro']['codename'] } else { - fail(translate('os.distro.codename fact not available: release parameter required')) + fail('os.distro.codename fact not available: release parameter required') } } else { $_release = $release @@ -84,7 +84,7 @@ if $ensure == 'present' { if ! $location { - fail(translate('cannot create a source entry without specifying a location')) + fail('cannot create a source entry without specifying a location') } elsif ($::apt::proxy['https_acng']) and ($location =~ /(?i:^https:\/\/)/) { $_location = regsubst($location, 'https://','http://HTTPS///') @@ -106,7 +106,7 @@ if $key { if $key =~ Hash { unless $key['id'] { - fail(translate('key hash must contain at least an id entry')) + fail('key hash must contain at least an id entry') } $_key = merge($::apt::source_key_defaults, $key) } else { @@ -145,7 +145,7 @@ 'origin' => $host, } } else { - fail(translate('Received invalid value for pin parameter')) + fail('Received invalid value for pin parameter') } create_resources('apt::pin', { "${name}" => $_pin }) } diff --git a/metadata.json b/metadata.json index 1dfa5d5428..2bb036fc6a 100644 --- a/metadata.json +++ b/metadata.json @@ -11,10 +11,6 @@ { "name": "puppetlabs/stdlib", "version_requirement": ">= 4.16.0 < 8.0.0" - }, - { - "name": "puppetlabs/translate", - "version_requirement": ">= 1.0.0 < 3.0.0" } ], "operatingsystem_support": [